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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
module SoOSiM.Components.PeriodicIO where
import Control.Concurrent.STM
import Control.Concurrent.STM.TQueue
import Control.Monad
import Data.List
import Data.Maybe
import SoOSiM
import SoOSiM.Components.Common
import SoOSiM.Components.Scheduler
newty... | christiaanb/SoOSiM-components | src/SoOSiM/Components/PeriodicIO.hs | mit | 2,872 | 56 | 16 | 1,010 | 913 | 510 | 403 | 62 | 3 |
module Y2017.M01.D26.Solution where
import Data.Function (on)
import Data.List (sortBy)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid (getSum)
import Data.Ord
-- below imports available from 1HaskellADay git repository
import Data.Bag (Bag, add, emptyBag)
import Y2017.M01.D25.Solution
{-... | geophf/1HaskellADay | exercises/HAD/Y2017/M01/D26/Solution.hs | mit | 2,395 | 0 | 11 | 378 | 254 | 142 | 112 | 17 | 1 |
{-# htermination nubBy :: (a -> a -> Bool) -> [a] -> [a] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_nubBy_1.hs | mit | 73 | 0 | 3 | 16 | 5 | 3 | 2 | 1 | 0 |
module Test.Scher.Generic
( M
, int
, integer
, range
, run
, assert
, assume
)
where
import Test.Scher.Klee.Common
#ifdef KLEE_IMPURE
import qualified Test.Scher.Klee.Impure as K
#endif
#ifdef KLEE_PURE
import qualified Test.Scher.Klee.Pure as K
#endif
#ifndef KLEE_PURE
#ifndef KLEE_IMPURE
import... | m-alvarez/scher | Test/Scher/Generic.hs | mit | 583 | 0 | 8 | 127 | 188 | 115 | 73 | 19 | 1 |
{-# LANGUAGE
TypeOperators
, FlexibleContexts #-}
module Render.Simple where
import Calculus.Connectives.Simple
import Calculus.Connectives.Linear
import Calculus.Expr
import Auxiliary.List
import Control.Monad.State
import Data.List
type UniqNames = String
initUniqNames = ['a'..'z']
type NameSupply a = State ... | wowofbob/calculus | Render/Simple.hs | mit | 2,509 | 0 | 13 | 648 | 906 | 447 | 459 | -1 | -1 |
module Main where
import Test.Framework (defaultMain)
import qualified Dojo.Poker.Tests
main :: IO ()
main = defaultMain [ Dojo.Poker.Tests.tests ] | b52/kata-poker | tests/TestSuite.hs | mit | 150 | 0 | 7 | 21 | 46 | 28 | 18 | 5 | 1 |
{-# OPTIONS_GHC -Wall #-}
module AsPatterns where
import Data.Char
isSubsequenceOf :: (Eq a) => [a] -> [a] -> Bool
isSubsequenceOf sub s = and $ map ((flip elem) s) sub
capitalizeWords :: String -> [(String, String)]
capitalizeWords s = map (\wd@(x:xs) -> (wd, (toUpper x):xs)) $ words s
capitalizeWord :: Strin... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter11.hsproj/AsPatterns.hs | mit | 1,054 | 0 | 16 | 190 | 499 | 268 | 231 | 23 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
---------------------------------------------------... | sestrella/react-haskell | src/Application.hs | mit | 917 | 0 | 11 | 107 | 135 | 78 | 57 | 17 | 0 |
module Language.Lips.LanguageDef where
--------------------
-- Global Imports --
import Control.Applicative
import Data.Monoid
----------
-- Code --
-- Error types
data ErrorType = VariableNotDefinedError
| InvalidFunctionApplicationError
| InvalidArrayIndexError
| Invali... | crockeo/lips | src/lib/Language/Lips/LanguageDef.hs | mit | 2,251 | 0 | 10 | 660 | 714 | 371 | 343 | 55 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module IHaskell.Display.Charts () where
import ClassyPrelude
import System.Directory
import Data.Default.Class
import Graphics.Rendering.Chart.Renderable
import Graphics.Rendering.Chart.Backend.Cairo
import qualified Data.ByteString.Char8 as Char
import System.IO.Unsafe
import IHas... | aostiles/LiveHaskell | ihaskell-display/ihaskell-charts/IHaskell/Display/Charts.hs | mit | 1,173 | 0 | 13 | 211 | 280 | 152 | 128 | 29 | 2 |
module Backend.Prelude
( module X
, (<$$>)
) where
import RIO as X hiding (Handler, timeout)
import Control.Error.Util as X (hush, note)
import Control.Monad as X (replicateM)
import Control.Monad.Logger as X
( MonadLogger
, MonadLoggerIO
, runNoLoggingT
, runStderrLoggingT
, runStdoutLoggingT
)
imp... | cdparks/lambda-machine | backend/src/Backend/Prelude.hs | mit | 1,602 | 0 | 10 | 268 | 526 | 352 | 174 | 50 | 1 |
main = putStrLn . show $ primes !! 1000
primes = sieve [2..]
where sieve (p:xs) = p : sieve [x | x <- xs, mod x p > 0]
| benji6/project-euler-solutions | haskell/7.hs | mit | 121 | 0 | 12 | 32 | 77 | 39 | 38 | 3 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGPathSegLinetoAbs
(js_setX, setX, js_getX, getX, js_setY, setY, js_getY, getY,
SVGPathSegLinetoAbs, castToSVGPathSegLinetoAbs,
gTypeSVGPathSegLinetoAbs)
where
import Prelude ((.), (... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGPathSegLinetoAbs.hs | mit | 2,450 | 28 | 9 | 318 | 615 | 361 | 254 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.API.Mandrill.Whitelists where
import Network.API.Mandrill.Response
import Network.API.Mandrill.Types
import Network.API.Mandrill.Utils
-- | Adds an email to your email rejection whitelist. If the address is
-- currently on your blacklist, that blacklist entry will ... | krgn/hamdrill | src/Network/API/Mandrill/Whitelists.hs | mit | 1,110 | 0 | 10 | 267 | 207 | 116 | 91 | 21 | 1 |
module Main (main) where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (when)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.Monoid ((<>))
import Options.Applicative (eitherReader, Parser, strOption, long, short, m... | mithrandi/ssh-key-generator | app/KeyTool.hs | mit | 2,728 | 0 | 14 | 658 | 806 | 415 | 391 | 71 | 1 |
module Language.Jass.ShowIndent(
ShowIndent(..),
makeIndent,
commaSep,
newlineSep,
sepWith
) where
-- | Printing with indentation
class ShowIndent a where
-- | As show but makes indentation with specified level
showIndent :: Int -> a -> String
-- | Default implementation of indentation
makeIndent ... | NCrashed/hjass | src/library/Language/Jass/ShowIndent.hs | mit | 766 | 0 | 10 | 176 | 209 | 116 | 93 | 19 | 3 |
import Test.HUnit
import qualified Data.Map as M
import Expr
import Nat
import Tree
-- Expr
expr = BinOp Minus (Var "y") (Const (I 3))
prog1 =
[ "x" $= Const (B True)
, "x" $= Const (I 3)
, "y" $= Var "x" `plus` Var "x"
, "x" $= Const (B False)
]
prog2 =
[ "x" $= Const (B True)
, "x" $= ... | nkartashov/haskell | hw06/Main.hs | gpl-2.0 | 3,329 | 0 | 15 | 936 | 1,765 | 941 | 824 | 73 | 1 |
main = do
a <- return "hell"
b <- return "yeah!"
putStrLn $ a ++ " " ++ b
| softwaremechanic/Miscellaneous | Haskell/7.hs | gpl-2.0 | 81 | 0 | 9 | 26 | 41 | 18 | 23 | 4 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.P... | JPMoresmau/leksah | src/IDE/Pane/WebKit/Inspect.hs | gpl-2.0 | 3,602 | 1 | 20 | 620 | 829 | 482 | 347 | 74 | 1 |
-- String.hs Copyright 2014-17 John F. Miller
-- | String data and functions
{-# LANGUAGE OverloadedStrings #-}
module String
( module Data.String
, SapString
, mkStringLiteral
, string
, stringLength
, sconcat
) where
import qualified Data.Text.Lazy as T
import Data.Monoid
import Data.String
import Con... | antarestrader/sapphire | String.hs | gpl-3.0 | 1,488 | 0 | 10 | 306 | 487 | 267 | 220 | 38 | 1 |
{-# LANGUAGE OverloadedLists #-}
module Kalkulu.Builtin.AtomQ(atomQ) where
import Control.Monad (when)
import Kalkulu.Builtin
import Kalkulu.BuiltinSymbol as B
atomQ :: BuiltinDefinition
atomQ = defaultBuiltin {
downcode = downcodeAtomQ
}
downcodeAtomQ :: Expression -> Kernel Expression
downcodeAtomQ e@(Cmp _... | vizietto/kalkulu | src/Kalkulu/Builtin/AtomQ.hs | gpl-3.0 | 612 | 0 | 10 | 119 | 194 | 103 | 91 | 17 | 1 |
module DependencyGraph (
module Graphs
, module Imports
, module Modules
, module Loaders
, startGraph
, displayGraph
, printableNode
, printGraph
) where
import Control.Applicative
import Data.String.Utils
import System.IO
import Paths_dependency_graph
import DependencyGraph.GraphModules as Graphs
... | pellagic-puffbomb/haskpy-dependency-graphs | src/DependencyGraph.hs | gpl-3.0 | 1,547 | 0 | 15 | 288 | 493 | 257 | 236 | 44 | 1 |
{- |
Module : Tct.Encoding.Precedence
Copyright : (c) Martin Avanzini <[email protected]>,
Georg Moser <[email protected]>,
Andreas Schnabl <[email protected]>
License : LGPL (see COPYING)
Maintainer : Martin Avanzini <[email protected]>
... | mzini/TcT | source/Tct/Encoding/Precedence.hs | gpl-3.0 | 4,787 | 0 | 13 | 1,307 | 1,431 | 776 | 655 | 87 | 1 |
{-# LANGUAGE BangPatterns #-}
-----------------------------------------------------------------------------
--
-- Fast write-buffered Handles
--
-- (c) The University of Glasgow 2005-2006
--
-- This is a simple abstraction over Handles that offers very fast write
-- buffering, but without the thread safety that Handle... | shayan-najd/HsParser | U/BufWrite.hs | gpl-3.0 | 3,511 | 0 | 14 | 1,048 | 1,080 | 541 | 539 | 88 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/DeleteLogStream.hs | mpl-2.0 | 3,342 | 0 | 9 | 719 | 408 | 247 | 161 | 54 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Instances/Patch.hs | mpl-2.0 | 3,925 | 0 | 15 | 909 | 470 | 283 | 187 | 73 | 1 |
module Main where
data Expr = Expr | Stmt
main :: IO ()
main = putStrLn "Hello, GrCal"
| gr-a-m/GrCal | src/Main.hs | mpl-2.0 | 89 | 0 | 6 | 20 | 32 | 18 | 14 | 4 | 1 |
ans :: [Int] -> String
ans (0:y:_)
| y <= 1911 = "M" ++ show(y-1867)
| y <= 1925 = "T" ++ show(y-1911)
| y <= 1988 = "S" ++ show(y-1925)
| otherwise = "H" ++ show(y-1988)
ans (1:y:_) = show(y + 1867)
ans (2:y:_) = show(y + 1911)
ans (3:y:_) = show(y + 1925)
ans (4:y:_) = show(y + 1988)
main = do
c <- getLin... | a143753/AOJ | 0337.hs | apache-2.0 | 392 | 3 | 11 | 108 | 306 | 150 | 156 | 15 | 1 |
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------... | ideas-edu/ideas | src/Ideas/Utils/QuickCheck.hs | apache-2.0 | 3,204 | 0 | 16 | 739 | 1,023 | 551 | 472 | 58 | 1 |
module Github.Review.URISpec where
import Control.Applicative
import qualified Data.List as L
import Data.Maybe
import Github.Review
import Network.URI
import Test.Hspec
-- import Test.QuickCheck
testUrl :: String
testUrl = "https://api.github.com/repos/scho... | erochest/gitreview-core | specs/Github/Review/URISpec.hs | apache-2.0 | 1,720 | 0 | 14 | 455 | 380 | 199 | 181 | 36 | 1 |
{-# LANGUAGE FlexibleContexts, GADTs, DeriveDataTypeable #-}
module Propellor.Property.Chroot (
debootstrapped,
bootstrapped,
provisioned,
hostChroot,
Chroot(..),
ChrootBootstrapper(..),
Debootstrapped(..),
ChrootTarball(..),
noServices,
inChroot,
exposeTrueLocaldir,
-- * Internal use
provisioned',
propa... | ArchiveTeam/glowing-computing-machine | src/Propellor/Property/Chroot.hs | bsd-2-clause | 12,151 | 124 | 17 | 2,160 | 3,056 | 1,586 | 1,470 | -1 | -1 |
{-# LANGUAGE BangPatterns, CPP, GeneralizedNewtypeDeriving #-}
-- |
-- Module : Data.Text.Foreign
-- Copyright : (c) 2009, 2010 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : [email protected]
-- Portability : GHC
--
-- Support for using 'Text' data with native code via the Haskell
-- foreign f... | bos/text | src/Data/Text/Foreign.hs | bsd-2-clause | 6,172 | 0 | 15 | 1,414 | 1,257 | 683 | 574 | 79 | 1 |
module Finance.Market where
import Data.Time
data MarketState = PreHours |
Open |
AfterHours |
Closed
deriving (Show, Read, Eq, Ord, Enum, Bounded)
-- | For use with the TradeKing `/market/clock` API call.
data MarketClock = MarketClock {
mcState :: ... | tathougies/hstradeking | src/Finance/Market.hs | bsd-3-clause | 504 | 0 | 10 | 148 | 128 | 73 | 55 | -1 | -1 |
-- Ajatus: tiedostojen lukemiseen liittyvät CSV/ENVI/TFW -parserit yms.
-- tänne, jotta irrallaan IO-kaluista.
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RecordWildCards #-}
module Parsers where
import qualified Data.Attoparsec.Text as P
import qualified Data.Attoparsec.Combinator as P
import Control.Applicative
impo... | deggis/guesswork | src/Guesswork/Import/Parsers.hs | bsd-3-clause | 3,194 | 0 | 17 | 848 | 1,020 | 513 | 507 | 75 | 3 |
module Sexy.Instances.Eq.Either () where
import Sexy.Classes (Eq(..), BoolC(..))
import Sexy.Data (Either(..))
import Sexy.Instances.BoolC.Bool ()
instance (Eq a, Eq b) => Eq (Either a b) where
Left x == Left y = x == y
Right x == Right y = x == y
_ == _ = false
| DanBurton/sexy | src/Sexy/Instances/Eq/Either.hs | bsd-3-clause | 286 | 0 | 7 | 71 | 140 | 77 | 63 | 8 | 0 |
module SVG
( generatePlayingFieldSVG
, renderPiece
) where
import Data.List (intersperse)
import qualified Data.Map.Strict as Map
import Types
generatePlayingFieldSVG :: PlayingField -> String
generatePlayingFieldSVG pf = header ++ pieces ++ "\n" ++ footer
where
header =
unlines
[ "<?xml ver... | rkrzr/shcrabble | src/SVG.hs | bsd-3-clause | 2,191 | 0 | 16 | 574 | 509 | 270 | 239 | 54 | 1 |
{-# LANGUAGE OverloadedLists, OverloadedStrings, DeriveGeneric #-}
module AWS.IAM (tests) where
import AWS.Aeson
import Control.Concurrent (threadDelay)
import Control.Lens hiding ((.=))
import Data.Aeson (encode)
import Data.Aeson.Lens (key, _String, values, _Value)
import Data.Char (toUpper)
import Data.IORef (IORef... | bos/wreq | tests/AWS/IAM.hs | bsd-3-clause | 10,107 | 0 | 22 | 2,743 | 2,667 | 1,341 | 1,326 | -1 | -1 |
--------------------------------------------------------------------------------
module WhatMorphism.TemplateHaskell
( deriveFoldBuildFusion
, deriveFold
, deriveBuild
, deriveFusion
) where
--------------------------------------------------------------------------------
import Control.M... | jaspervdj/what-morphism | src/WhatMorphism/TemplateHaskell.hs | bsd-3-clause | 7,737 | 0 | 23 | 2,514 | 2,075 | 1,052 | 1,023 | 152 | 3 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Syntax.Pretty where
import qualified Data.Map as Map
import Data.String (IsString, fromString)
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Vector (Ve... | Danten/lejf | src/Syntax/Pretty.hs | bsd-3-clause | 11,095 | 0 | 19 | 2,917 | 4,226 | 2,092 | 2,134 | 261 | 7 |
-----------------------------------------------------------------------------
--
-- Module : FNIStash.Logic.Env
-- Copyright : 2013 Daniel Austin
-- License : AllRightsReserved
--
-- Maintainer : [email protected]
-- Stability : Development
-- Portability :
--
-- |
--
-----------------------------... | fluffynukeit/FNIStash | src/FNIStash/Logic/Env.hs | bsd-3-clause | 9,608 | 0 | 20 | 2,306 | 2,309 | 1,229 | 1,080 | 168 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Agon.Data.Instances where
import Agon.Data.Types
import Control.Applicative
import Control.Monad
import Data.Aeson
instance FromJSON UUIDs where
parseJSON (Object v) = UUIDs <$> v .: "uuids"
parseJSON _ = mzero
instance FromJSON CouchUpdateResult where
parseJSO... | Feeniks/Agon | app/Agon/Data/Instances.hs | bsd-3-clause | 661 | 0 | 8 | 130 | 207 | 107 | 100 | 18 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# OPTIONS_GHC -Wall #-}
-- | Calculate incremental changes of data structures.
--
-- The 'Incremental' class provides a set of functions that work like the unix
-- utilities 'diff' and 'patch'. 'changes' generates an incremental diff between
-- two data values. The incremental di... | JohnLato/increments | src/Data/Increments.hs | bsd-3-clause | 2,207 | 0 | 5 | 395 | 95 | 82 | 13 | 8 | 0 |
{-# LANGUAGE PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.System.Gcc
-- Copyright : (c) 2008 Benedikt Huber
-- License : BSD-style
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : port... | ian-ross/language-c | src/Language/C/System/GCC.hs | bsd-3-clause | 4,824 | 0 | 17 | 1,430 | 1,267 | 688 | 579 | 68 | 13 |
{-# LANGUAGE CPP, FlexibleInstances, BangPatterns, ViewPatterns #-}
#if __GLASGOW_HASKELL__ >= 700
{-# OPTIONS -fllvm #-}
#endif
module Data.TrieMap.RadixTrie.Split () where
import Data.TrieMap.RadixTrie.Base
#define V(f) f (VVector) (k)
#define U(f) f (PVector) (Word)
#define LOC(args) !(locView -> Loc args)
#define... | lowasser/TrieMap | Data/TrieMap/RadixTrie/Split.hs | bsd-3-clause | 2,493 | 38 | 13 | 542 | 881 | 445 | 436 | -1 | -1 |
module Ariadne.Types where
import Data.Generics.Zipper
type Query h x = Zipper h -> Maybe x
type Move h = Zipper h -> Maybe (Zipper h) | apsk/ariadne | src/Ariadne/Types.hs | bsd-3-clause | 147 | 0 | 8 | 34 | 53 | 30 | 23 | 4 | 0 |
{-# LANGUAGE PackageImports #-}
-- import Prelude hiding (take)
import Control.Applicative
import "monads-tf" Control.Monad.Trans
import Data.Pipe
import Data.Pipe.Lazy
import Data.Pipe.List
import Data.Pipe.ByteString hiding (toLazy)
import qualified Data.Pipe.ByteString as PBS
import Data.Time
import System.IO
impo... | YoshikuniJujo/simple-pipe | try/testToLazy.hs | bsd-3-clause | 1,012 | 2 | 10 | 165 | 280 | 159 | 121 | 22 | 1 |
import Control.Monad (replicateM)
import Data.Bits
import qualified Data.ByteString.Lazy as B
import Data.Char (ord)
import Data.List (nub, (\\))
import Data.Maybe
import Data.Word
import qualified Data.UUID as U
import qualified Data.UUID.V1 as U
import qualified Data.UUID.V3 as U3
import qualified Data.UUID.V5 as U5
... | alphaHeavy/uuid | tests/TestUUID.hs | bsd-3-clause | 5,592 | 0 | 13 | 1,333 | 1,536 | 822 | 714 | 130 | 1 |
area :: Double -> Double
area x = c + s
where
c = (x / 2) ^ 2 * pi / 2
s = x ^ 2
| YoshikuniJujo/funpaala | samples/12_syntaxes/where.hs | bsd-3-clause | 84 | 0 | 11 | 31 | 57 | 30 | 27 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Snap.Utilities.Configuration.Types (
ConfigPair
) where
import qualified Data.Configurator.Types as CT
import Data.Text (Text)
------------------------------------------------------------------------------
-- | Look up a value.
type ConfigPair = (Text, CT.Value)
| anchor/snap-configuration-utilities | lib/Snap/Utilities/Configuration/Types.hs | bsd-3-clause | 309 | 2 | 6 | 34 | 51 | 35 | 16 | 6 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
--
-- This is basically a semaphore. I made this because 'sem_wait(3)'
-- terminates the application without throwing an exception and there
-- is no chance to clean up resources. There is a version ... | comatose/redo | src/Development/Redo/TokenServer.hs | bsd-3-clause | 5,462 | 0 | 21 | 1,325 | 1,591 | 810 | 781 | 137 | 5 |
module Karamaan.Opaleye.Applicative where
import Control.Applicative (Applicative, (<$>), (<*>), pure)
-- vv TODO: don't want to have to import all those explicitly. What to do?
import Data.Profunctor.Product.Flatten
-- vv and these
import Data.Profunctor.Product.Tuples
liftA0 :: Applicative f => r -> f r
liftA0 = p... | dbp/karamaan-opaleye | Karamaan/Opaleye/Applicative.hs | bsd-3-clause | 5,491 | 0 | 18 | 1,901 | 3,259 | 1,633 | 1,626 | 119 | 1 |
{-- snippet chanExample --}
import Control.Concurrent
import Control.Concurrent.Chan
chanExample = do
ch <- newChan
forkIO $ do
writeChan ch "hello world"
writeChan ch "now i quit"
readChan ch >>= print
readChan ch >>= print
{-- /snippet chanExample --}
| binesiyu/ifl | examples/ch24/Chan.hs | mit | 271 | 0 | 10 | 55 | 69 | 32 | 37 | 9 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Haddock.Doc (
docAppend
, docParagraph
, combineDocumentation
) where
import Data.Maybe
import Data.Monoid
import Haddock.Types
import Data.Char (isSpace)
-- We put it here so that we can avoid a circular import
-- anything relevant imports this module anyway
instance Mo... | jwiegley/ghc-release | utils/haddock/src/Haddock/Doc.hs | gpl-3.0 | 2,496 | 0 | 11 | 421 | 791 | 399 | 392 | 47 | 1 |
{-# LANGUAGE PatternGuards, ViewPatterns #-}
{-
map f [] = []
map f (x:xs) = f x : map f xs
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs)
foldl f z [] = z
foldl f z (x:xs) = foldl f (f z x) xs
-}
{-
<TEST>
f (x:xs) = negate x + f xs ; f [] = 0 -- f xs = foldr ((+) . negate) 0 xs
f (x:xs) = x + 1 : f xs ; f... | bergmark/hlint | src/Hint/ListRec.hs | bsd-3-clause | 5,799 | 9 | 17 | 1,503 | 2,095 | 1,076 | 1,019 | 94 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Nav_msgs.Path where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
... | acowley/roshask | msgs/Nav_msgs/Ros/Nav_msgs/Path.hs | bsd-3-clause | 1,378 | 1 | 10 | 228 | 376 | 224 | 152 | 36 | 0 |
{-# LANGUAGE UndecidableInstances #-}
module Compiler.Generics where
import Data.Foldable
import Data.Monoid
newtype FixA a f = In { out :: a f (FixA a f) }
newtype Id f a = Id { unId :: f a }
deriving Eq
instance Eq (a f (FixA a f)) => Eq (FixA a f) where
In x == In y = x == y
type Fix f = FixA Id f
foldA ::... | tomlokhorst/AwesomePrelude | src/Compiler/Generics.hs | bsd-3-clause | 768 | 0 | 15 | 207 | 447 | 231 | 216 | -1 | -1 |
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Test.StateMachine.Types.GenSym
-- Copyright : (C) 2018, HERE Europe B.V.
-- License : BSD-style (see the file LICENSE)
--
... | advancedtelematic/quickcheck-state-machine-model | src/Test/StateMachine/Types/GenSym.hs | bsd-3-clause | 1,399 | 0 | 14 | 290 | 263 | 151 | 112 | 27 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.LocalBuildInfo
-- Copyright : Isaac Jones 2003-2004
--
-- Maintainer : [email protected]
-- Portability : portable
--
-- Once a package has been configured we have resolved conditionals a... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/LocalBuildInfo.hs | gpl-3.0 | 18,620 | 0 | 13 | 4,629 | 3,274 | 1,811 | 1,463 | 285 | 3 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1993-1998
TcRules: Typechecking transformation rules
-}
{-# LANGUAGE ViewPatterns #-}
module TcRules ( tcRules ) where
import HsSyn
import TcRnMonad
import TcSimplify
import TcMType
import TcType
import TcHsType
import TcExpr
import Tc... | oldmanmike/ghc | compiler/typecheck/TcRules.hs | bsd-3-clause | 14,503 | 2 | 17 | 4,474 | 1,640 | 849 | 791 | 134 | 3 |
module TreeParser
( parseTree
)
where
import BasicPrelude ( Maybe(Just, Nothing)
, Either(..)
, error
, head
... | dogweather/nevada-revised-statutes-parser | src/TreeParser.hs | bsd-3-clause | 1,600 | 0 | 13 | 723 | 264 | 152 | 112 | -1 | -1 |
-- | Make sure this program runs without leaking memory
import FRP.Sodium
import Control.Applicative
import Control.Exception
import Control.Monad
import System.Timeout
verbose = False
main = do
(et, _) <- sync newEvent
(eChange, pushC) <- sync $ newEvent
out <- sync $ hold 0 eChange
kill <- sync $ li... | kevintvh/sodium | haskell/examples/tests/memory-test-5.hs | bsd-3-clause | 495 | 0 | 14 | 124 | 185 | 94 | 91 | 15 | 2 |
-----------------------------------------------------------------------------
--
-- Object-file symbols (called CLabel for histerical raisins).
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module CLabel (
CLabel, -- abstract type... | tibbe/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | 47,943 | 0 | 16 | 13,560 | 9,447 | 4,985 | 4,462 | 728 | 21 |
module Init
(
createSugarScape
) where
import Control.Monad.Random
import Data.List
import Agent
import Common
import Discrete
import Model
createSugarScape :: RandomGen g
=> Int
-> Discrete2dDimension
-> Bool
-> Rand g ([(AgentId, SugAg... | thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapeSTMTVar/src/Init.hs | gpl-3.0 | 4,319 | 0 | 16 | 1,197 | 1,394 | 771 | 623 | 95 | 3 |
-- Mutable and immutable byte arrays (identical internally), usable for
-- unboxed arrays, and built from FFI primitives.
module Hugs.ByteArray (
MutableByteArray,
newMutableByteArray, readMutableByteArray, writeMutableByteArray,
ByteArray,
unsafeFreezeMutableByteArray, thawByteArray, readByteArray
) where
im... | kaoskorobase/mescaline | resources/hugs/packages/hugsbase/Hugs/ByteArray.hs | gpl-3.0 | 3,153 | 28 | 12 | 561 | 653 | 345 | 308 | 49 | 1 |
module Main (main) where
import Graphics.UI.Gtk
main :: IO ()
main = do
initGUI
-- Create a new window
window <- windowNew
-- Here we connect the "destroy" event to a signal handler.
on window objectDestroy mainQuit
-- Sets the border width of the window.
set window [ containerBorderWidth := 10 ]
... | k0001/gtk2hs | gtk/demo/buttonbox/ButtonBox.hs | gpl-3.0 | 1,536 | 0 | 11 | 334 | 198 | 102 | 96 | 19 | 1 |
module ShouldCompile where
postInlineUnconditionally
= case Just "Hey" of
-- The point of examining occ_info here is that for *non-values*
-- that occur outside a lambda, the call-site inliner won't have
-- a chance (because it doesn't know that the thing
-- only occurs once). The p... | sdiehl/ghc | testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs | bsd-3-clause | 2,007 | 0 | 8 | 707 | 71 | 53 | 18 | 7 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Utility functions on @Core@ syntax
-}
{-# LANGUAGE CPP #-}
module CoreSubst (
-- * Main data types
Subst(..), -- Implementation exported for supercompiler's Renaming.hs only
TvSubstEnv, IdSubstEnv,... | green-haskell/ghc | compiler/coreSyn/CoreSubst.hs | bsd-3-clause | 58,634 | 1 | 22 | 14,950 | 11,358 | 5,971 | 5,387 | 664 | 13 |
{-# LANGUAGE OverloadedStrings #-}
module Document.Tests.Parser where
-- Modules
import Document.Tests.Suite as S
import Test.UnitTest
import Logic.Theories.FunctionTheory
import UnitB.Expr
import UnitB.QuasiQuote
-- Library
import Control.Lens
import Control.Monad.State
import Data.Map
test_case :: Test... | literate-unitb/literate-unitb | src/Document/Tests/Parser.hs | mit | 4,347 | 0 | 14 | 1,219 | 706 | 407 | 299 | -1 | -1 |
module Base.Light
( Light(..)
, lightContributions
) where
import Math.Vector
import Math.Ray
import Base.Material
import Base.Intersection
import Control.Lens
data Attenuation = Atten Double Double Double
data Light =
Directional Color Unit3
| Point Color Vector3 Attenuation
| Spot Color Vector3 Atte... | burz/Rayzer | Base/Light.hs | mit | 1,842 | 0 | 25 | 470 | 831 | 421 | 410 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, UndecidableInstances, OverlappingInstances #-}
module Language.Meta.C.Show where
import Language.Meta.C.Literal
import Language.Meta.C.AST
import Language.Meta.SExpr
import Data.List (intercalate)
parens :: String -> String
parens x = "(" ++ x ++ ")"
angles :: String -> String
angles x... | ykst/MetaC | Language/Meta/C/Show.hs | mit | 5,217 | 1 | 12 | 1,412 | 1,448 | 719 | 729 | 141 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Prelude.String.Type (
String,
) where
import Prelude (
String,
)
| scott-fleischman/cafeteria-prelude | src/Prelude/String/Type.hs | mit | 121 | 0 | 5 | 29 | 23 | 16 | 7 | 5 | 0 |
-- Monoid is a type class.
-- It is for types whose values can be combined together with a binary operation.
class Monoid m where
mempty :: m
mappend :: m -> m -> m
mconcat :: [m] -> m
mconcat = foldr mappend mempty
-- Only concrete types can be made monoids.
-- This is different from Functors and Ap... | v0lkan/learning-haskell | monoids.hs | mit | 2,049 | 1 | 9 | 495 | 608 | 333 | 275 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, DeriveDataTypeable,
UnboxedTuples, GHCForeignImportPrim, UnliftedFFITypes,
MagicHash
#-}
module JavaScript.Web.MessageEvent ( MessageEvent
, getData
, MessageEventData... | ghcjs/ghcjs-base | JavaScript/Web/MessageEvent.hs | mit | 1,386 | 4 | 11 | 392 | 236 | 139 | 97 | 25 | 3 |
import Test.Hspec (it, shouldBe, hspec)
import LuciansLusciousLasagna (elapsedTimeInMinutes, expectedMinutesInOven, preparationTimeInMinutes)
main :: IO ()
main = hspec $ do
it "expectedMinutesInOven" $ do
expectedMinutesInOven `shouldBe` 40
it "preparationTimeInMinutes" $
preparat... | exercism/xhaskell | exercises/concept/lucians-luscious-lasagna/test/Tests.hs | mit | 437 | 0 | 12 | 93 | 112 | 58 | 54 | 10 | 1 |
{--
- Problem 28
Sorting a list of lists according to length of sublists
a) We suppose that a list contains elements that are lists themselves. The objective is to sort the elements
of this list according to their length. E.g. short lists first, longer lists later, or vice versa.
Example:
* (lsort '((a... | sighingnow/Functional-99-Problems | Haskell/28.hs | mit | 1,427 | 0 | 11 | 344 | 126 | 71 | 55 | 7 | 1 |
-- | A generic formula used for various logics, most notably propositional logic
-- and first-order logic (Sphinx.FOL module). The structure mostly follows
-- Harrison (2009), however, binary connectives ('and', 'or', ...) are
-- aggregated into a BinOp type.
--
-- Reference:
-- John Harrison, Handbook of Practical L... | PhDP/Sphinx-AI | Faun/Formula.hs | mit | 7,024 | 0 | 14 | 1,934 | 2,632 | 1,331 | 1,301 | 125 | 13 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Language.Inference.Semantics where
-- Reference: Generalizing Hindley-Milner Type Inference Algorithms (2002)
import Language.Inference.Syntax
import Data.Foldable (foldrM)
import Data.Maybe
import Data.Monoid
import Control.Monad.State
import qualified Data.Set as Se... | robertclancy/tapl | inference/lib/Language/Inference/Semantics.hs | gpl-2.0 | 6,105 | 0 | 15 | 1,445 | 2,206 | 1,102 | 1,104 | 120 | 2 |
-- $Id: GenUtil.hs,v 1.27 2004/07/12 23:31:34 john Exp $
-- arch-tag: 835e46b7-8ffd-40a0-aaf9-326b7e347760
-- Copyright (c) 2002 John Meacham ([email protected])
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the
-- "Software"),... | opqdonut/riot | Ginsu/GenUtil.hs | gpl-2.0 | 16,722 | 0 | 15 | 3,989 | 5,771 | 3,083 | 2,688 | 299 | 6 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : ./OWL2/ProfilesAndSublogics.hs
Copyright : (c) Felix Gabriel Mance
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : portable
OWL2 Profiles (EL, QL and RL) + OWL2 complexity a... | gnn/Hets | OWL2/ProfilesAndSublogics.hs | gpl-2.0 | 1,792 | 0 | 10 | 324 | 516 | 272 | 244 | 40 | 1 |
module Grammar where
import DataTypesEtc
grammar :: Grammar
-- the potato grammar
grammar nt = case nt of
Program -> [[prog, FuncName, ProgBody]]
ProgBody -> [[semi, Rep0 [Line], stop, dot]]
Line -> [[Decl]
,[Assign]
,[F... | Ertruby/PPFinalProject | src/Grammar.hs | gpl-2.0 | 4,773 | 0 | 13 | 2,149 | 1,448 | 840 | 608 | 123 | 38 |
module Blink where
import Control.Monad (forever)
import System.Hardware.Arduino
import System.Environment
pauseTime :: Int
pauseTime = 500
-- prepare the led
prepareLed :: Pin -> Arduino ()
prepareLed = flip setPinMode OUTPUT
-- make the led blink
blink :: Pin -> Arduino ()
blink l = do digitalWrite l True
... | ardumont/harduino-lab | src/Blink.hs | gpl-2.0 | 810 | 0 | 11 | 222 | 209 | 104 | 105 | 22 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
{-# LANGUAGE NoMonomorphismRestriction, DeriveDataTypeable #-}
module TAC.Data where
import Autolib.Reader
import Autolib.ToDoc
import Autolib.FiniteMap
import Autolib.Util.Zufall
type Program = [ Statement ]
data Statement
= Constant Int Int
| Add ... | Erdwolf/autotool-bonn | src/TAC/Data.hs | gpl-2.0 | 2,252 | 7 | 15 | 685 | 1,001 | 494 | 507 | 68 | 3 |
{-# LANGUAGE CPP #-}
{-
Copyright (C) 2009 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, or
(at your option) any later version.
... | bergmannf/gitit | src/Network/Gitit/Page.hs | gpl-2.0 | 7,427 | 0 | 19 | 2,199 | 1,694 | 901 | 793 | 131 | 8 |
{-# LANGUAGE ViewPatterns #-}
{- | The events found in the \"PART VOCALS\", \"HARM1\", \"HARM2\", and
\"HARM3\" tracks. -}
module Data.Rhythm.RockBand.Lex.Vocals where
import Data.Rhythm.RockBand.Common
import qualified Sound.MIDI.Message.Channel.Voice as V
import qualified Data.Rhythm.MIDI as MIDI
import Data.Rh... | mtolly/rhythm | src/Data/Rhythm/RockBand/Lex/Vocals.hs | gpl-3.0 | 3,237 | 0 | 18 | 697 | 1,099 | 565 | 534 | 82 | 14 |
{-# LANGUAGE ExistentialQuantification #-}
module Scheme
( symbol
,readExpr
,eval
,extractValue
,trapError
) where
import Text.ParserCombinators.Parsec hiding (spaces)
import System.Environment
import Control.Monad
import Control.Monad.Except
import Numeric
-- Data Types --{{{--
data LispE... | jdcannon/hascheme | src/Scheme.hs | gpl-3.0 | 11,590 | 0 | 15 | 3,893 | 3,811 | 1,947 | 1,864 | 253 | 5 |
module Main (main) where
import DailyProgrammer
| d-strickland/dailyprogrammer | haskell/main/Main.hs | gpl-3.0 | 48 | 0 | 4 | 6 | 12 | 8 | 4 | 2 | 0 |
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, UndecidableInstances, TemplateHaskell, PatternGuards #-}
module Action (Action (..), resolveAction) where
import BasicTypes
import CommonTypes
import Object
import Data.Data
import Game
import Data.Accessor
import Control.Mona... | arirahikkala/straylight-divergence | src/Action.hs | gpl-3.0 | 1,393 | 0 | 26 | 437 | 345 | 183 | 162 | 34 | 4 |
{-# 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 #-}
-- ... | olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/CreateRole.hs | mpl-2.0 | 5,237 | 0 | 14 | 1,125 | 709 | 430 | 279 | 90 | 1 |
module Handler.MarkdownTutorial where
import Import
getMarkdownTutorialR :: Handler Html
getMarkdownTutorialR = defaultLayout $ do
setTitle "Markdown Tutorial | Snowdrift.coop"
$(widgetFile "markdown")
| Happy0/snowdrift | Handler/MarkdownTutorial.hs | agpl-3.0 | 214 | 0 | 10 | 33 | 42 | 21 | 21 | 6 | 1 |
-- | The Commands module contains a representation of a single Hexwax expandIO-USB command as documented in its datasheet, which you can find here: <http://www.firmwarefactory.com/Docs/expandIO-USB%20HW148.pdf>
module Commands
(
HWCmd, HWMsg, CmdId, Payload,
hwCmd,
cSETSERIAL,
... | emacstheviking/hexwax-usb | Commands.hs | lgpl-3.0 | 4,683 | 0 | 12 | 1,357 | 1,187 | 700 | 487 | 127 | 2 |
module Git.Repository (
-- The 'Repository' type
Repository,
-- Locating repositories
findRepository, gitDir, loadObject, commitParent, walkAncestors,
peelTo
) where
import Control.Exception
import System.IO
import System.FilePath
import System.Directory
import Data.ByteString.Internal
import... | wereHamster/yag | Git/Repository.hs | unlicense | 3,342 | 0 | 12 | 716 | 1,095 | 548 | 547 | 84 | 3 |
-----------------------------------------------------------------------------
--
-- Module : Parse.Pretty
-- Copyright : (c) DICOM Grid Inc. 2013
-- License : MIT
--
-- Maintainer : Phillip Freeman <[email protected]>
-- Stability : experimental
-- Portability :
--
-- |
--
----------------------------... | uProxy/uproxy-idl-compiler | Parse/Pretty.hs | apache-2.0 | 8,312 | 0 | 12 | 1,351 | 2,522 | 1,229 | 1,293 | 217 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module CouchDB.DBChallenge where
import qualified Data.ByteString.Char8 as C
import Data.Conduit
import Data.Conduit.List as CL
import Data.Maybe ... | alexandrelucchesi/pfec | server-common/src/CouchDB/DBChallenge.hs | apache-2.0 | 1,949 | 0 | 17 | 503 | 454 | 242 | 212 | 39 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Spark.Core.Internal.RowUtils(
-- jsonToCell,
checkCell,
rowArray,
rowCell,
cellFromProto,
cellWithTypeFromProto,
cellWithTypeToProto
) where
-- import... | tjhunter/karps | haskell/src/Spark/Core/Internal/RowUtils.hs | apache-2.0 | 4,563 | 0 | 17 | 877 | 1,547 | 804 | 743 | 95 | 10 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Control.Monad.Trans.Class
import Control.Monad.Trans.Maybe
import Data.Maybe
import qualified Data.Text as T
import Filesystem.P... | erochest/open-haddock | Main.hs | apache-2.0 | 4,373 | 0 | 15 | 1,571 | 1,040 | 536 | 504 | 87 | 2 |
-- |
-- Module : Text.Megaparsec.Error.Builder
-- Copyright : © 2015–2017 Megaparsec contributors
-- License : FreeBSD
--
-- Maintainer : Mark Karpov <[email protected]>
-- Stability : experimental
-- Portability : portable
--
-- A set of helpers that should make construction of 'ParseError's m... | recursion-ninja/megaparsec | Text/Megaparsec/Error/Builder.hs | bsd-2-clause | 5,555 | 0 | 11 | 1,151 | 1,232 | 667 | 565 | 102 | 2 |
{-# LANGUAGE LambdaCase #-}
-- |a way to print expressions
module Language.Pureli.Printer where
import qualified Data.Map as M
import Language.Pureli.AST
class Printer a where
printer :: a -> String
---------------
-- Instances
---------------
instance Printer Module where
printer = showModule
instance Prin... | soupi/pureli | src/Language/Pureli/Printer.hs | bsd-3-clause | 3,881 | 0 | 15 | 869 | 1,378 | 699 | 679 | 89 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module CNC.HCodeTests where
import CNC.FanucMacro
import CNC.HCode
import CNC.AwePrelude
import Prelude(Num(..), Fractional(..), Floating(..), Int, ($), id, putStrLn, (++), show)
import Control.Monad(mapM_)
fcode_prog1 = FOps
[ FLabel (UserLabel "start")
, FAssign (FCell 101) (... | akamaus/gcodec | test/CNC/HCodeTests.hs | bsd-3-clause | 3,630 | 0 | 17 | 1,002 | 1,577 | 758 | 819 | 119 | 1 |
{-# LANGUAGE PatternGuards #-}
module Idris.Docs (pprintDocs, getDocs, pprintConstDocs, FunDoc(..), Docs (..)) where
import Idris.AbsSyntax
import Idris.AbsSyntaxTree
import Idris.Delaborate
import Idris.Core.TT
import Idris.Core.Evaluate
import Idris.Docstrings (Docstring, emptyDocstring, noDocs, nullDocstring, rende... | andyarvanitis/Idris-dev | src/Idris/Docs.hs | bsd-3-clause | 8,927 | 0 | 23 | 3,208 | 3,037 | 1,532 | 1,505 | 171 | 16 |
{-# LANGUAGE ExistentialQuantification
, FlexibleContexts
#-}
module Unpacker where
import Control.Monad.Except
import Definition
data Unpacker m = forall a. Eq a => AnyUnpacker (LispVal -> m a)
unpackEquals :: MonadError LispError m => LispVal -> LispVal -> Unpacker m -> m Bool
unpackEquals arg1 arg2... | comraq/scheme-interpreter | src/Unpacker.hs | bsd-3-clause | 1,427 | 0 | 11 | 306 | 507 | 248 | 259 | 32 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.