code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
#!/usr/bin/env runhaskell
import Control.Monad (void)
import System.Libnotify
main :: IO ()
main = void $ withNotifications Nothing $
do new "Same title" "line 1" "" $
do addHint (HintString "append" "allowed")
removeHints
render
new "Same title" "l... | supki/libnotify | tests/remove-hints-test.hs | mit | 442 | 0 | 13 | 166 | 111 | 51 | 60 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Typecrawl.Platforms (typepad, wpLeMonde, blogger)
where
import Text.HTML.Scalpel ((@:), hasClass, (//))
import Typecrawl.Types
-- Should work with any basic typepad
typepad :: PlatformParseInstructions
typepad = Ppis ("span" @: [hasClass "pager-right"] // "a")
... | Raveline/typecrawl | lib/Typecrawl/Platforms.hs | mit | 1,339 | 0 | 11 | 403 | 334 | 186 | 148 | -1 | -1 |
module DoesItCompile where
-- Question 1
bigNum = (^) 5 $ 10
wahoo = (^) bigNum $ 10
-- Question 2
x = print
y = print "woohoo!"
z = x "hello world"
-- Question 3
a = (+)
b = 5
c = a b 10
d = a c 200
-- Question 4
a4 = 12 + b4
b4 = 10000 * c4
c4 = 10
| rasheedja/HaskellFromFirstPrinciples | Chapter5/doesItCompile.hs | mit | 255 | 0 | 6 | 72 | 112 | 65 | 47 | 13 | 1 |
-- | Type and functions for terms: the objects of first-order logic.
module Faun.Term where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.List (foldl')
import qualified Data.Text as T
import Data.Monoid ((<>), mconcat)
import qualified Faun.Text as FT
import Faun.ShowTxt
-- | A term represents an... | PhDP/Sphinx-AI | Faun/Term.hs | mit | 4,609 | 0 | 15 | 1,068 | 1,427 | 750 | 677 | 84 | 4 |
-- | A generalization of LIO's core components to work for any monad, instead of just IO.
module LMonad (module LMonad) where
import LMonad.TCB as LMonad (
Label (..)
, LMonad (..)
, LMonadT
, runLMonad
, runLMonadWith
, lLift
, getCurrentLabel
, getClearance
... | jprider63/LMonad | src/LMonad.hs | mit | 744 | 0 | 6 | 246 | 106 | 74 | 32 | 24 | 0 |
{- |
Module : $Header$
Description : run hets as server
Copyright : (c) Christian Maeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : non-portable (via imports)
-}
module PGIP.Server (hetsServer) where
impo... | nevrenato/HetsAlloy | PGIP/Server.hs | gpl-2.0 | 52,065 | 1 | 37 | 15,052 | 15,179 | 7,693 | 7,486 | 1,033 | 43 |
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-}
{-
Copyright (C) 2006-2014 John MacFarlane <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, ... | nickbart1980/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | 42,630 | 0 | 29 | 11,494 | 14,871 | 7,654 | 7,217 | 1,099 | 5 |
module Handler.AufgabenAktuell where
import Import
import Data.Set (fromList)
import Control.Types
import Handler.Aufgaben (aufgabenListe)
getAufgabenAktuellR :: VorlesungId -> Handler Html
getAufgabenAktuellR = aufgabenListe $ fromList [Current]
| marcellussiegburg/autotool | yesod/Handler/AufgabenAktuell.hs | gpl-2.0 | 250 | 0 | 7 | 28 | 61 | 35 | 26 | 7 | 1 |
{- |
Module : $Header$
Description : To be replaced by SoftFOL.DFGParser
Copyright : (c) Immanuel Normann, Uni Bremen 2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : portable
-}
module Search.SPASS.DFGParser where
im... | nevrenato/Hets_Fork | Search/SPASS/DFGParser.hs | gpl-2.0 | 11,823 | 151 | 15 | 2,565 | 2,350 | 1,322 | 1,028 | 154 | 2 |
module Text.Pandoc2 ( module Text.Pandoc2.Definition
, module Text.Pandoc2.Builder
, module Text.Pandoc2.Shared
, module Text.Pandoc2.Reader.Markdown
, module Text.Pandoc2.Writer.HTML
)
where
import Text.Pandoc2.Definition
im... | jgm/pandoc2 | Text/Pandoc2.hs | gpl-2.0 | 441 | 0 | 5 | 124 | 77 | 54 | 23 | 10 | 0 |
{- |
mtlstats
Copyright (C) 1984, 1985, 2019, 2020, 2021 Rhéal Lamothe
<[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) ... | mtlstats/mtlstats | src/Mtlstats/Control/NewGame.hs | gpl-3.0 | 7,871 | 0 | 22 | 2,005 | 2,168 | 1,112 | 1,056 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.QSemN
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : [email protected]
-- Stability : experimental
... | kaoskorobase/mescaline | resources/hugs/packages/base/Control/Concurrent/QSemN.hs | gpl-3.0 | 2,747 | 10 | 14 | 980 | 536 | 293 | 243 | 37 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
-- |
-- Copyright : (c) 2010, 2011 Simon Meier
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Simon Meier <[email protected]>
-- Portability : GHC only
--
-- Conversion of the graph part of a sequent to a Graphviz Dot file.
module Theory.Co... | rsasse/tamarin-prover | lib/theory/src/Theory/Constraint/System/Dot.hs | gpl-3.0 | 22,990 | 0 | 24 | 7,300 | 6,580 | 3,410 | 3,170 | 364 | 6 |
{-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs, OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
module Teatros.Persistent where
import Database.Persist.TH
import Data.Text (Text)
share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
Ficha... | arpunk/jfdb | src/Teatros/Persistent.hs | gpl-3.0 | 2,844 | 0 | 7 | 697 | 48 | 29 | 19 | 6 | 0 |
{-
mtlstats
Copyright (C) 1984, 1985, 2019, 2020, 2021 Rhéal Lamothe
<[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) an... | mtlstats/mtlstats | test/Helpers/PositionSpec.hs | gpl-3.0 | 2,116 | 0 | 15 | 472 | 480 | 270 | 210 | 42 | 1 |
module Utils.Xhtml ( niceDashes
, uC) where
import Text.XHtml
-- Very simple atm. Not easily extended to handle emdashes too.
niceDashes :: String -> String
niceDashes [] = []
niceDashes (x:xs)
| x == '-' = "–" ++ niceDashes xs
| otherwise = x : niceDashes xs
uC :: Char -> Html... | spwhitton/sariulclocks | src/Utils/Xhtml.hs | gpl-3.0 | 395 | 0 | 8 | 105 | 125 | 65 | 60 | 10 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bits
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICE... | jwiegley/ghc-release | libraries/base/Data/Bits.hs | gpl-3.0 | 15,595 | 0 | 13 | 4,665 | 2,552 | 1,445 | 1,107 | 195 | 2 |
{-# OPTIONS -XPatternGuards #-}
{-
Generate a distromap, like these:
http://hackage.haskell.org/packages/archive/00-distromap/
Format:
("xmobar","0.8",Just "http://packages.gentoo.org/package/x11-misc/xmobar")
("xmobar","0.9",Just "http://packages.gentoo.org/package/x11-misc/xmobar")
("xmobar","0.9.2",Just "http://pac... | Heather/hackport | DistroMap.hs | gpl-3.0 | 6,117 | 0 | 14 | 1,067 | 1,573 | 830 | 743 | 89 | 3 |
module Language.Octopus.Data where
import Import
import qualified Data.Sequence as Seq
import qualified Data.Map as Map
import Control.Monad.Reader
import Control.Monad.State
import Control.Concurrent.MVar (MVar)
type Tag = (Word, Text) -- ^ Integer for comparison, Text for spelling error reports
type Exn = (Word, V... | Zankoku-Okuno/octopus | Language/Octopus/Data.hs | gpl-3.0 | 6,450 | 0 | 20 | 2,037 | 2,247 | 1,206 | 1,041 | 134 | 5 |
module Interface.Database where
import Data.Maybe
import Data.Vector (Vector, fromList)
import Database.HDBC
import Database.HDBC.Sqlite3 (connectSqlite3)
queryVar :: String -> String -> FilePath -> IO (Vector Double)
queryVar var cut infile = do
conn <- connectSqli... | cbpark/GluinoStopPolarization | lib/Interface/Database.hs | gpl-3.0 | 1,085 | 0 | 14 | 339 | 367 | 184 | 183 | 26 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-iam/gen/Network/Google/Resource/IAM/Organizations/Roles/Delete.hs | mpl-2.0 | 7,200 | 0 | 16 | 1,418 | 816 | 488 | 328 | 110 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Finish.hs | mpl-2.0 | 4,641 | 0 | 16 | 1,068 | 572 | 337 | 235 | 86 | 1 |
-- | Convenience hooks for writing custom @Setup.hs@ files for
-- bindings.
module Data.GI.CodeGen.CabalHooks
( setupHaskellGIBinding
) where
import qualified Distribution.ModuleName as MN
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import Distribution.Simple (UserHooks(..), simp... | hamishmack/haskell-gi | lib/Data/GI/CodeGen/CabalHooks.hs | lgpl-2.1 | 6,111 | 0 | 15 | 1,833 | 1,454 | 802 | 652 | -1 | -1 |
{-# language DeriveFunctor, DeriveFoldable #-}
module Data.StrictList where
import Control.Monad (ap)
import Data.Foldable as F
data StrictList a
= !a :! !(StrictList a)
| Empty
deriving (Show, Functor, Foldable)
infixr 5 :!
instance Monoid (StrictList a) where
mempty = Empty
... | nikki-and-the-robots/nikki | src/Data/StrictList.hs | lgpl-3.0 | 1,733 | 0 | 10 | 483 | 673 | 355 | 318 | 53 | 3 |
------------------------------------------------------------------------------
-- |
-- Module : Even
-- Copyright : (C) 2011 Aliaksiej Artamonaŭ
-- License : LGPL
--
-- Maintainer : [email protected]
-- Stability : unstable
-- Portability : unportable
--
-- Example for TTM package. Decides whe... | aartamonau/haskell-ttm | examples/Even.hs | lgpl-3.0 | 1,277 | 0 | 13 | 302 | 185 | 103 | 82 | 12 | 1 |
maximum' :: (Ord a) => [a] -> a
maximum' [] = error "maximum of empty list"
maximum' [x] = x
maximum' (x:xs) = max x (maximum' xs)
| tokyo-jesus/university | src/haskell/recursion/maximumAwesome.hs | unlicense | 131 | 0 | 7 | 27 | 72 | 37 | 35 | 4 | 1 |
module Main where
import Hello
import OpIO
main :: IO ()
main = run hello
| aztecrex/haskell-testing-with-free-monad | app/Main.hs | unlicense | 76 | 0 | 6 | 17 | 28 | 16 | 12 | 5 | 1 |
-- Copyright (c) 2010 - Seweryn Dynerowicz
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agree... | sdynerow/Semirings-Library | haskell/PathInformations/Paths.hs | apache-2.0 | 1,741 | 0 | 11 | 433 | 543 | 288 | 255 | 39 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-
Created : 2015 Aug 26 (Wed) 11:56:37 by Harold Carr.
Last Modified : 2015 Sep 17 (Thu) 15:44:26 by Harold Carr.
-}
module Service.UserEndpoint
( ueMain
)
where
import Control.Monad.IO.Class (liftIO)
import Data.Aeson (decode, encode)
import ... | haroldcarr/utah-haskell | future/src/Service/UserEndpoint.hs | apache-2.0 | 1,826 | 0 | 23 | 665 | 499 | 240 | 259 | 39 | 2 |
-- http://www.codewars.com/kata/541c8630095125aba6000c00
module DigitalRoot where
digitalRoot :: Integral a => a -> a
digitalRoot n = if n < 10
then n
else (digitalRoot . sum . map (`mod`10) . takeWhile (>0) . iterate (`div`10)) n | Bodigrim/katas | src/haskell/6-Sum-of-Digits--Digital-Root.hs | bsd-2-clause | 235 | 0 | 12 | 40 | 88 | 50 | 38 | 5 | 2 |
{-# LANGUAGE PackageImports #-}
module GHC.IO.Encoding.UTF16 (module M) where
import "base" GHC.IO.Encoding.UTF16 as M
| silkapp/base-noprelude | src/GHC/IO/Encoding/UTF16.hs | bsd-3-clause | 124 | 0 | 4 | 18 | 25 | 19 | 6 | 3 | 0 |
{-#LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent.HEP as HEP
import Control.Concurrent
import Control.Concurrent.HEP.Syslog
import System.IO
import Control.Monad.Trans
import Control.Monad.Trans.Either
import Control.Monad
import Network.AMQP as AMQP
imp... | dambaev/wbinfomq | src/wbinfomq.hs | bsd-3-clause | 5,632 | 0 | 17 | 1,537 | 1,409 | 671 | 738 | 139 | 6 |
--------------------------------------------------------------------------------
-- | Wraps pandocs bibiliography handling
--
-- In order to add a bibliography, you will need a bibliography file (e.g.
-- @.bib@) and a CSL file (@.csl@). Both need to be compiled with their
-- respective compilers ('biblioCompiler' and '... | bergmark/hakyll | src/Hakyll/Web/Pandoc/Biblio.hs | bsd-3-clause | 3,797 | 0 | 13 | 812 | 575 | 322 | 253 | 54 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : non-portable
-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSi... | dalaing/type-systems | src/Fragment/Tuple/Ast/Error.hs | bsd-3-clause | 2,653 | 0 | 12 | 457 | 732 | 393 | 339 | 59 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Setup
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : [email protected]
-- Stability : provisional
-- Portability : portable
--
--
--------------------... | alphaHeavy/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | 45,137 | 0 | 27 | 12,151 | 10,169 | 5,756 | 4,413 | 892 | 5 |
-- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.BlendingFactor
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : [email protected]
-- Stabil... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/BlendingFactor.hs | bsd-3-clause | 2,227 | 0 | 9 | 439 | 458 | 244 | 214 | 55 | 15 |
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-}
module Graphics.BarChart.Parser.Progression where
import Text.CSV
import System.FilePath
import Graphics.BarChart.Types
import Graphics.BarChart.Parser
import Graphics.BarChart.Rendering
-- | Used by 'writeProgressionChart' to generate a bar chart from
-- progress... | sebfisch/haskell-barchart | src/Graphics/BarChart/Parser/Progression.hs | bsd-3-clause | 1,021 | 0 | 10 | 181 | 226 | 120 | 106 | 20 | 2 |
{-# LANGUAGE
ConstraintKinds
, FlexibleContexts
, FlexibleInstances
, MultiParamTypeClasses
, ScopedTypeVariables
, TypeFamilies
, TypeSynonymInstances
#-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
--------------------------------------------------------------------------------
-- |
-- Module : Grap... | mgsloan/toy-gtk-diagrams | src/Graphics/UI/Toy/Gtk/Diagrams.hs | bsd-3-clause | 3,832 | 0 | 15 | 791 | 675 | 379 | 296 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Spring13.Week7.Scrabble where
import Data.Char
newtype Score = Score Int
deriving (Eq, Read, Show, Ord, Num)
instance Monoid Score where
mempty = Score 0
mappend = (+)
score :: Char -> Score
score c
| c' `elem` "aeilnorstu" = Score 1
| c' `elem` "dg" = S... | bibaijin/cis194 | src/Spring13/Week7/Scrabble.hs | bsd-3-clause | 657 | 0 | 9 | 155 | 294 | 153 | 141 | 23 | 1 |
{-#LANGUAGE OverloadedStrings, NoMonomorphismRestriction, TupleSections#-}
import Control.Applicative
import Control.Monad
import System.Directory
import System.FilePath
import Data.String
import Data.Conduit
import qualified Data.Conduit.List as CL
import Data.Conduit.Filesystem
import qualified Filesystem.Path ... | philopon/cabal-src-recache | Main.hs | bsd-3-clause | 2,611 | 0 | 16 | 779 | 824 | 428 | 396 | 53 | 3 |
--
--
--
----------------
-- Exercise 9.2.
----------------
--
--
--
module E'9''2 where
mult :: Integer -> Integer -> Integer
mult 0 _ = 0
mult left right
= right + mult ( left - 1 ) right
{- GHCi>
mult 1 2
mult 2 2
-}
-- 2
-- 4
-- GHCi> mult 0 ( fact ( -2 ) )
-- 0
-- Explanation: the "right" arg... | pascal-knodel/haskell-craft | _/links/E'9''2.hs | mit | 667 | 0 | 8 | 182 | 73 | 48 | 25 | 5 | 1 |
--(Arith,4 + 3,3 + 4,1)
--(Arith,1 + 0,1,1)
--(Language,2*3,Aterm,1)
--(Arith,(2 : 5) + (1 : 6),(4 : 1),1)
-- (Ptruth,(F :| (F :| T)) :| (T :| X),True,1)
1 (Ptaut,P :> ((Neg (Neg P) :> P) :| Q),T,1)
2 done (Ptaut,(Neg P :<> P) :> (Q :<> Q),T,1)
3 done (Ptaut,(P :| P) :> Neg (Neg P),T,1)
5 done (Ptaut,(Neg P :& P) :> ... | abdulrahimnizamani/OccamStar | Occam2Examples.hs | gpl-2.0 | 693 | 3 | 14 | 194 | 464 | 241 | 223 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-codepipeline/gen/Network/AWS/CodePipeline/DisableStageTransition.hs | mpl-2.0 | 5,361 | 0 | 12 | 1,119 | 644 | 387 | 257 | 90 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Control.Concurrent.Utils
( Lock()
, Exclusive(..)
, Synchronised(..)
, withLock
) where
import Control.Distributed.Process
( Process
)
import qualified Control.Distributed.Process as Process (catch)
import Control.Excep... | qnikst/distributed-process-extras | src/Control/Concurrent/Utils.hs | bsd-3-clause | 1,855 | 0 | 13 | 556 | 617 | 331 | 286 | 52 | 1 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | jean-edouard/manager | storehouse/StoreHouse/VHD/Forest.hs | gpl-2.0 | 3,239 | 16 | 20 | 675 | 847 | 450 | 397 | 68 | 4 |
module Main where
import Control.Monad (void)
import Graphics.Vty
main :: IO ()
main = do
cfg <- standardIOConfig
vty <- mkVty cfg
let line1 = charFill (defAttr `withBackColor` blue) ' ' 10 1
line2 = charFill (defAttr `withBackColor` green) ' ' 10 1
img = translate 10 5 (line1 `vertJoin` line2)
... | jtdaugherty/vty | test/Issue76.hs | bsd-3-clause | 400 | 0 | 12 | 97 | 154 | 79 | 75 | 14 | 1 |
module Hugs.ForeignPtr
(
ForeignPtr -- abstract, instance of: Eq
, FinalizerPtr
, FinalizerEnvPtr
, newForeignPtr_ -- :: Ptr a -> IO (ForeignPtr a)
, addForeignPtrFinalizer -- :: FinalizerPtr a -> ForeignPtr a -> IO ()
, addForeignPtrFinalizerEnv -- :: FinalizerEnvPtr ... | kaoskorobase/mescaline | resources/hugs/packages/hugsbase/Hugs/ForeignPtr.hs | gpl-3.0 | 1,220 | 23 | 11 | 294 | 263 | 145 | 118 | -1 | -1 |
module IRTS.CodegenC (codegenC) where
import Idris.AbsSyntax
import IRTS.Bytecode
import IRTS.Lang
import IRTS.Simplified
import IRTS.Defunctionalise
import IRTS.System
import IRTS.CodegenCommon
import Idris.Core.TT
import Util.System
import Numeric
import Data.Char
import Data.Bits
import Data.List (intercalate)
imp... | mrmonday/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | 32,663 | 0 | 27 | 9,379 | 14,894 | 7,408 | 7,486 | 587 | 32 |
module Case1 where
fib n
| n <= 1 = 1
| otherwise = case (fib (n-1), fib (n-2)) of
(n1, n2) -> n1 + n2 + 1
| RefactoringTools/HaRe | old/testing/evalMonad/Case1.hs | bsd-3-clause | 152 | 0 | 10 | 73 | 81 | 42 | 39 | 5 | 1 |
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [8,1])
withPackageDb $ do
withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]
withDirectory "mysql" $ setup_install_with_docs ["--ipid", "mysql-0.1.0.0"]
withDirectory "pos... | mydaum/cabal | cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs | bsd-3-clause | 948 | 0 | 16 | 196 | 203 | 97 | 106 | 17 | 1 |
euclideanDistance :: [Double] -> [Double] -> Double
euclideanDistance p q = sqrt . sum $ zipWith (\ u v -> (u-v)^2) p q
| imanmafi/Algorithm-Implementations | Euclidean_distance/Haskell/jcla1/euclidean_distance.hs | mit | 120 | 0 | 11 | 23 | 66 | 35 | 31 | 2 | 1 |
{-# LANGUAGE PolyKinds, GADTs, KindSignatures, DataKinds, FlexibleInstances #-}
module T7438a where
data Thrist :: k -> k -> * where
Nil :: Thrist a a
| urbanslug/ghc | testsuite/tests/polykinds/T7438a.hs | bsd-3-clause | 157 | 0 | 6 | 31 | 30 | 18 | 12 | 4 | 0 |
{-# htermination fmToList_GE :: (Ord a, Ord k) => FiniteMap (Either a k) b -> (Either a k) -> [((Either a k),b)] #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_fmToList_GE_10.hs | mit | 135 | 0 | 3 | 26 | 5 | 3 | 2 | 1 | 0 |
module Main(main) where
import System.Directory (Permissions)
import System.IO (FilePath)
data Info = Info {
infoPath :: FilePath
, infoPerms :: Maybe Permissions
, infoSize :: Maybe Integer
, infoModTime :: Maybe ClockTime
} deriving (Eq, Ord, Show)
| rockdragon/julia-programming | code/haskell/ControlVisit.hs | mit | 310 | 0 | 9 | 96 | 86 | 50 | 36 | 9 | 0 |
{-# htermination (/=) :: Float -> Float -> Bool #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_SLASHEQ_8.hs | mit | 52 | 0 | 2 | 10 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, NamedFieldPuns #-}
-- | Just re-exports a few of the types from
-- "Service.Twilio.Types". There are a number of helper functions
-- which are currently exposed by "Service.Twilio.Types" that aren't
-- exposed here.
module Service.Twilio (
-- * Base Twilio types
... | reifyhealth/twill | src/Service/Twilio.hs | mit | 1,748 | 0 | 11 | 381 | 289 | 182 | 107 | 31 | 1 |
module Control.Concurrent.ForkOrDoPool where
import Control.Concurrent
import Control.Concurrent.MVar as MVar
import Data.List as List
import Data.Maybe as Maybe
import Prelude.Extensions as PreludeExt
type ForkOrDoPool = [(ThreadId, MVar (IO ()))]
createPool :: Int -> IO ForkOrDoPool
createPool = \number_of_threads ... | stevedonnelly/haskell | code/Control/Concurrent/ForkOrDoPool.hs | mit | 1,282 | 5 | 19 | 248 | 463 | 243 | 220 | 32 | 1 |
module Language.PCPL.Syntax
( Program(..)
, Domino(..)
, Symbol
, syms
, unsyms
) where
import Language.UTM.Syntax
-- | PCPL program
data Program = Program
{ startDomino :: Input -> Domino
, dominos :: [Domino]
, separator :: Symbol
}
data Domino = Domino [Symbol] [Symbo... | davidlazar/PCPL | src/Language/PCPL/Syntax.hs | mit | 347 | 0 | 9 | 101 | 101 | 64 | 37 | 13 | 0 |
module PostgREST.Parsers where
import Protolude hiding (try, intercalate)
import Control.Monad ((>>))
import Data.Text (intercalate)
import Data.List (init, last)
import Data.Tree
import ... | NotBrianZach/postgrest | src/PostgREST/Parsers.hs | mit | 5,173 | 0 | 22 | 1,286 | 1,893 | 987 | 906 | 112 | 2 |
module System.Flannel.ParamsSpec
( spec
) where
import System.Flannel.Params
import Test.Hspec
spec :: Spec
spec = do
describe "defaultParams" $ do
it "sets every field as empty" $ do
isSet "test" defaultParams `shouldBe` False
getOption "test" defaultParams `shouldBe` Noth... | nahiluhmot/flannel | spec/System/Flannel/ParamsSpec.hs | mit | 1,178 | 0 | 14 | 349 | 321 | 152 | 169 | 28 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Network.RestClientSpec (main, spec) where
import Helper
import Network.RestClient
main :: IO ()
main = hspec spec
withServer :: (IO Req -> IO a) -> IO a
withServer = withHttpServer status200 [("Content-Type", ... | sol/rest-client | test/Network/RestClientSpec.hs | mit | 1,063 | 0 | 15 | 244 | 300 | 150 | 150 | 26 | 1 |
module Y2017.M04.D19.Exercise where
import Data.Aeson
-- below imports available from 1HaskellADay git repository
import Wikidata.Query.Aeson
import Wikidata.Query.Endpoint
import Y2017.M04.D18.Exercise
{--
Okay, today we're going to do the same thing as yesterday, but with a different
SPARQL query. Recall that we... | geophf/1HaskellADay | exercises/HAD/Y2017/M04/D19/Exercise.hs | mit | 987 | 0 | 8 | 156 | 129 | 80 | 49 | 16 | 1 |
module Spear.Math.Vector.Vector3
(
Vector3(..)
, Right3
, Up3
, Forward3
, Position3
-- * Construction
, unitx3
, unity3
, unitz3
, zero3
, vec3
, orbit
-- * Operations
, cross
)
where
import Spear.Math.Vector.Class
import Foreign.C.Types (CFloat)
import Forei... | jeannekamikaze/Spear | Spear/Math/Vector/Vector3.hs | mit | 4,913 | 0 | 12 | 1,800 | 1,900 | 973 | 927 | 111 | 1 |
import Control.Monad (forM_)
import Data.Array
import qualified Data.Char as Char
import qualified Data.List as List
data Light = On | Off
deriving (Eq, Show)
type Lights = Array Coordinates Light
type Coordinates = (Int, Int)
main = do
lightsList <- List.transpose <$> map (map parseInput) <$> lines <$> getCont... | SamirTalwar/advent-of-code | 2015/AOC_18_2.hs | mit | 2,075 | 0 | 16 | 517 | 860 | 468 | 392 | 54 | 3 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Database.EventSafe.ConcSpec
( spec
) where
import Control.Concurrent
import Control.Monad
import Database.EventSafe.Conc
import Database.EventSafe.Types
import Test.Hspec
data EventExample = EventExample deriving (Show, Eq, Ord)
data ResourceRefExample ... | thoferon/eventsafe | tests/Database/EventSafe/ConcSpec.hs | mit | 1,492 | 0 | 21 | 398 | 413 | 204 | 209 | 38 | 1 |
module Elm (module X) where
import Elm.Common as X (Options (..), defaultOptions)
import Elm.Decoder as X
import Elm.Encoder as X
import Elm.File as X
import Elm.Record as X
import Elm.Type as X
| InfernalKnight/elm-export | src/Elm.hs | epl-1.0 | 264 | 0 | 6 | 101 | 64 | 45 | 19 | 7 | 0 |
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-}
module PolymorphismSpec (spec) where
import Test.Hspec
import Language.Mulang.Ast
import Language.Mulang.Inspector.Combiner (scoped)
import Language.Mulang.Inspector.Contextualized (contextualized, decontextualize)
import ... | mumuki/mulang | spec/PolymorphismSpec.hs | gpl-3.0 | 9,768 | 0 | 18 | 3,703 | 1,052 | 559 | 493 | 96 | 1 |
import Test.QuickCheck
import Data.List
myCompress' :: Eq a => [a] -> [a] -> [a]
myCompress' c [] = c
myCompress' [] x = myCompress' [head x] (tail x)
myCompress' c x =
case head x == last c of
True -> myCompress' c (tail x)
False -> myCompress' (c ++ [head x]) (tail x)
myCompress :: Eq a => [a] -> [a]
myCompres... | CmdrMoozy/haskell99 | 008.hs | gpl-3.0 | 473 | 2 | 12 | 99 | 243 | 122 | 121 | 14 | 2 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-|
Module : LDLogic
Description : Linear Dynamic Logic
-}
module LDLogic where
import Logic
import Reg
import Prelude hiding (negate)
-- We'll define our own negate.... | passionfruit18/ldl_exposition | src/LDLogic.hs | gpl-3.0 | 4,075 | 0 | 15 | 832 | 1,089 | 565 | 524 | 63 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/Resource/AndroidManagement/Enterprises/EnrollmentTokens/Create.hs | mpl-2.0 | 5,644 | 0 | 17 | 1,243 | 779 | 454 | 325 | 118 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE PackageImports #-}
--
-- Copyright (c) 2009-2014 Stefan Wehr - http://www.stefanwehr.de
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser G... | ekarayel/HTF | Test/Framework/Preprocessor.hs | lgpl-2.1 | 24,270 | 0 | 26 | 9,227 | 5,802 | 3,122 | 2,680 | 472 | 21 |
{-# LANGUAGE Safe, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.GroupWiths
-- Copyright : (c) Uli Köhler 2014
-- License : Apache License v2.0
-- Maintainer : [email protected]
-- Stability : provisional
-- Port... | kyclark/group-with | Control/GroupWith.hs | apache-2.0 | 5,997 | 0 | 14 | 1,526 | 1,102 | 630 | 472 | 68 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
module Startups.GameTypes where
import Startups.Base
impor... | bitemyapp/7startups | Startups/GameTypes.hs | bsd-3-clause | 4,991 | 0 | 13 | 1,269 | 1,194 | 644 | 550 | 88 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
------------------... | facebookincubator/duckling | Duckling/Ranking/Classifiers/EN_TT.hs | bsd-3-clause | 264,531 | 0 | 15 | 128,796 | 43,570 | 27,184 | 16,386 | 4,117 | 1 |
module Dxedrine.Hlists where
import Control.Monad (forM_, replicateM_)
import Dxedrine.Words
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import qualified Data.ByteString.Lazy as BL
import Data.Maybe (fromMaybe)
import Data.Word (Word8(..), Word16(..))
data Range =
IgnoreR Int
| OneR Word8 W... | ejconlon/dxedrine | src/Dxedrine/Hlists.hs | bsd-3-clause | 4,539 | 0 | 25 | 1,366 | 1,983 | 997 | 986 | 140 | 11 |
module Tct.Trs.Data.Precedence
( Order (..)
, Precedence (..)
, precedence
, empty
, insert
, eclasses
, recursionDepth
, ranks
) where
import qualified Control.Monad.State.Strict as St
import Data.List (find)
import qualified Data.Map as M
import ... | ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Data/Precedence.hs | bsd-3-clause | 2,563 | 0 | 21 | 766 | 1,081 | 565 | 516 | 56 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, DeriveFunctor, OverloadedStrings, PatternGuards #-}
-- | Types used to generate the input.
module Input.Item(
Sig(..), Ctx(..), Ty(..),
Item(..), itemName,
Target(..), TargetId(..),
splitIPackage, splitIModule,
hseToSig, hseToItem
) w... | BartAdv/hoogle | src/Input/Item.hs | bsd-3-clause | 5,430 | 0 | 14 | 1,277 | 2,200 | 1,144 | 1,056 | 106 | 21 |
{-# LANGUAGE
TemplateHaskell
, QuasiQuotes
#-}
module Language.Haskell.TH.HDBI
(
deriveToRow
, deriveFromRow
) where
-- import Control.Applicative
import Control.Monad
import Control.Applicative
import Database.HDBI.SqlValue (ToRow(..),
FromRow(..),
... | s9gf4ult/hdbi | Language/Haskell/TH/HDBI.hs | bsd-3-clause | 3,428 | 0 | 27 | 1,069 | 1,202 | 611 | 591 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
{-| This is a dummy backend that doesn't offer any formalism to specify models or verify contracts.
It is only used to provide a backend for testing purporses (Or if you are too lazy to write components). -}
module Language.GTL.Backend.None where
import Language.GTL.Backend
import Dat... | hguenther/gtl | lib/Language/GTL/Backend/None.hs | bsd-3-clause | 1,009 | 0 | 9 | 229 | 255 | 143 | 112 | 22 | 0 |
{-|
Module : Idris.Core.Evaluate
Description : Evaluate Idris expressions.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE BangPatterns, DeriveGeneric, FlexibleInstances,
MultiParamTypeClasses, PatternGuards #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module... | jmitchell/Idris-dev | src/Idris/Core/Evaluate.hs | bsd-3-clause | 56,761 | 0 | 27 | 20,577 | 19,696 | 10,079 | 9,617 | 991 | 80 |
{-# LANGUAGE TemplateHaskell #-}
module Main (
main
) where
import Test.Tasty
import Test.Tasty.QuickCheck
import System.Exit
import qualified Data.Schema.Sql.ScriptParseTest as SPT (testGroup)
main = defaultMain tests
tests :: TestTree
tests =
testGroup "All Tests" [
SPT.testGroup... | proegssilb/git-sql | test/MainTestSuite.hs | bsd-3-clause | 329 | 0 | 7 | 81 | 69 | 43 | 26 | 12 | 1 |
-- |
module X12.Tokens where
import Data.Text
data ElementToken = SimpleElementToken Text
| ComponentElementToken Text
| CompositeElementToken [ElementToken]
| RepeatedElementToken [ElementToken]
deriving (Eq, Show)
data SegmentToken = SegmentT... | alexkyllo/xtwelve | src/X12/Tokens.hs | bsd-3-clause | 490 | 0 | 9 | 200 | 88 | 53 | 35 | 10 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
module GhcUtilsSpec (main, spec) where
import Test.Hspec
import TestUtils
import qualified GHC as GHC
import qualified Data.Generics as SYB
import qualified GHC.SYB.Utils as SYB
import Language.Haskell.GHC.ExactPrint.Utils
import Language.Haskell.Refact... | mpickering/HaRe | test/GhcUtilsSpec.hs | bsd-3-clause | 3,442 | 0 | 30 | 851 | 988 | 550 | 438 | 63 | 2 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.INTEL.ParallelArrays
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability : portabl... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/INTEL/ParallelArrays.hs | bsd-3-clause | 1,012 | 0 | 4 | 109 | 70 | 54 | 16 | 12 | 0 |
module Board.MoveGen where
import Data.Bits
import Data.Char
import Data.Word
import Numeric
import Utils
import Text.Printf
import qualified Data.Vector.Unboxed as V
{-
noWe nort noEa
+7 +8 +9
\ | /
west -1 <- 0 -> +1 east
/ | \
-... | sphynx/hamisado | Board/MoveGen.hs | bsd-3-clause | 6,543 | 0 | 19 | 1,523 | 1,822 | 1,067 | 755 | 216 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{- |
Module : Kiosk.Backend.Data.ReportTemplate
Description : Render a Report Template from a Form and a list of DataTemplates
Copyright : Plow Technologies LLC
License : MIT License
Maintainer : Scott Murphy
Stability : experi... | plow-technologies/cobalt-kiosk-data-template | src/Kiosk/Backend/Data/ReportTemplate.hs | bsd-3-clause | 7,767 | 0 | 14 | 2,097 | 1,614 | 873 | 741 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import CNC.FanucMacro
import CNC.HCode
import CNC.GInterpreter
import CNC.GParser
import CNC.AwePrelude
--import Prelude(Num(..), Fractional(..), Floating(..), Int, ($), id, putStrLn, (++), Just)
import System.Environment
evaluateIsoFile :: FilePath -> IO ProgramS... | akamaus/gcodec | src/CNC/GEmulator.hs | bsd-3-clause | 680 | 0 | 13 | 141 | 163 | 79 | 84 | 21 | 2 |
{-# LANGUAGE OverloadedStrings, DoAndIfThenElse #-}
-- |
-- Command line utility, this is not meant to be used as a library.
--
-- To use as a library see the README or use this as an example of how
-- to combine the caching backend, request system, and parser/rule
-- checker.
module Main where
import Con... | ixmatus/grob | src/Grob.hs | bsd-3-clause | 8,593 | 0 | 17 | 2,457 | 2,080 | 1,072 | 1,008 | 149 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : $Header$
Description : Shrimp error types and pretty-printing
Copyright : (c) Galois, Inc.
Shrimp error types and pretty-printing
-}
module SCD.M4.Errors(Error(..), nubError, occurrences, flatten, distribute,
errorsByType) where
import SCD.M4.Syntax(IfdefId... | GaloisInc/sk-dev-platform | libs/SCD/src/SCD/M4/Errors.hs | bsd-3-clause | 8,929 | 0 | 16 | 2,374 | 2,680 | 1,369 | 1,311 | 140 | 3 |
import Control.Concurrent
import Control.Concurrent.STM.TVar
import Control.Monad
import Control.Monad.STM
import Data.IORef
import Data.Map
import Foreign.C.Types
import Foreign.Ptr
import Foreign.Storable
import Graphics.Rendering.OpenGL
import Graphics.UI.GLFW as GLFW
import System.Exit (exitWith, ExitCode (..))
imp... | imalsogreg/flycap | tests/multCameras.hs | bsd-3-clause | 6,866 | 0 | 18 | 1,373 | 2,771 | 1,376 | 1,395 | 164 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANG... | leptonyu/mint | corn-server/src/Service/User.hs | bsd-3-clause | 5,253 | 0 | 24 | 1,516 | 1,372 | 691 | 681 | 100 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.TypeLits.Singletons.Internal
-- Copyright : (C) 20... | goldfirere/singletons | singletons-base/src/GHC/TypeLits/Singletons/Internal.hs | bsd-3-clause | 10,075 | 11 | 13 | 2,152 | 2,801 | 1,508 | 1,293 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable,OverloadedStrings #-}
module XMonad.Actions.XHints.Translate where
import Data.Typeable
import XMonad.Actions.XHints.State
import qualified Language.Bing as B
import Language.Bing (BingLanguage,BingContext,ClientId,ClientSecret,getAccessToken,execBing)
import Control.Monad.IO.Class (Mon... | netogallo/XHints | src/XMonad/Actions/XHints/Translate.hs | bsd-3-clause | 1,214 | 0 | 16 | 202 | 367 | 196 | 171 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Air.Cli.Parser where
import Control.Applicative ((<$>), (<*>), (<*))
import Data.Char (chr)
import Data.ByteString hiding (map, elem)
import Data.Attoparsec hiding (satisfy)
import Data.Attoparsec.Combinator
import Data.Attoparsec.ByteString.Char8
import Air.Cli (Command(..)... | andorp/air | src/Air/Cli/Parser.hs | bsd-3-clause | 4,974 | 0 | 13 | 1,086 | 1,255 | 660 | 595 | 142 | 1 |
module ReplaceExperiment where
replaceWithP :: b -> Char
replaceWithP = const 'p'
lms :: [Maybe [Char]]
lms = [Just "Ave", Nothing, Just "woohoo"]
replaceWithP' :: [Maybe [Char]] -> Char
replaceWithP' = replaceWithP
liftedReplace :: Functor f => f a -> f Char
liftedReplace = fmap replaceWithP
liftedReplace' :: [M... | chengzh2008/hpffp | src/ch16-Functor/oneMoreList.hs | bsd-3-clause | 1,231 | 0 | 11 | 246 | 458 | 226 | 232 | 35 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_AMD_shader_explicit_vertex_parameter - device extension
--
-- == VK_AMD_shader_explicit_vertex_parameter
--
-- [__Name String__]
-- @VK_AMD_shader_explicit_vertex_parameter@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 22... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_AMD_shader_explicit_vertex_parameter.hs | bsd-3-clause | 3,769 | 0 | 8 | 721 | 197 | 151 | 46 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1999
Analysis functions over data types. Specficially, detecting recursive types.
This stuff is only used for source-code decls; it's recorded in interface
files for imported data types.
-}
{-# LANGUAGE CPP #-}
module TcTyD... | nushio3/ghc | compiler/typecheck/TcTyDecls.hs | bsd-3-clause | 45,303 | 3 | 19 | 12,879 | 6,142 | 3,219 | 2,923 | 426 | 10 |
{-# LANGUAGE ViewPatterns, TemplateHaskell #-}
module Data.TrieMap.Representation.TH.ReprMonad (
ReprMonad,
liftQuasi,
recurse,
getInstance,
outputInstance,
mustBreak,
execReprMonad,
forceDefaultListRep) where
import Data.TrieMap.Representation.Class
import Data.TrieMap.Representation.TH.Utils
import ... | lowasser/TrieMap | Data/TrieMap/Representation/TH/ReprMonad.hs | bsd-3-clause | 3,101 | 88 | 19 | 570 | 1,209 | 660 | 549 | 71 | 3 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[StgSyn]{Shared term graph (STG) syntax for spineless-tagless code generation}
This data type represents programs just before code generation (conversion to
@Cmm@): basically, what we have is a stylised form of @CoreSyntax@, the style
being one that... | vTurbine/ghc | compiler/stgSyn/StgSyn.hs | bsd-3-clause | 27,004 | 0 | 16 | 7,706 | 3,760 | 2,006 | 1,754 | 316 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
module Oracle.DiffOracleOld where
import qualified Data.IntMap as M
import Data.Maybe
import Data.List
import Debug.Trace
import Oracle.Internal
import Language.Clojure.Lang
import Language.Clojure.AST
import Util.UnixD... | nazrhom/vcs-clojure | src/Oracle/DiffOracleOld.hs | bsd-3-clause | 3,890 | 0 | 16 | 1,014 | 1,403 | 729 | 674 | 85 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.