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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
maybe Tips for using this guide
CodeWorld editor -> can link back to CodeWorld editor
program = drawingOf(wheel)
wheel = text("I Love Pandas!")
wheel = solidRectangle(8,4)
wheel = circle(5) --5 is radius
--multiple
program = drawingOf(design)
design = solidRectangle(4, 0.4)
& solidCircle(1.2)
& ci... | kammitama5/kammitama5.github.io | images/play_img/notes.hs | mit | 2,382 | 1 | 10 | 514 | 432 | 252 | 180 | -1 | -1 |
-- What's up next?
-- http://www.codewars.com/kata/542ebbdb494db239f8000046
module LazyNext where
next :: Eq a => a -> [a] -> Maybe a
next _ [] = Nothing
next item [x] = Nothing
next item (x:xs) = if x == item then Just(head xs) else next item xs
| gafiatulin/codewars | src/8 kyu/LazyNext.hs | mit | 249 | 0 | 8 | 47 | 100 | 53 | 47 | 5 | 2 |
module SuperUserSpark.Constants where
import Import
keywordCard :: String
keywordCard = "card"
keywordSpark :: String
keywordSpark = "spark"
keywordFile :: String
keywordFile = "file"
keywordInto :: String
keywordInto = "into"
keywordOutof :: String
keywordOutof = "outof"
keywordKindOverride :: String
keywordKin... | NorfairKing/super-user-spark | src/SuperUserSpark/Constants.hs | mit | 1,189 | 0 | 5 | 168 | 275 | 168 | 107 | 46 | 1 |
{-# htermination enumFromThenTo :: () -> () -> () -> [()] #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_enumFromThenTo_2.hs | mit | 62 | 0 | 2 | 12 | 3 | 2 | 1 | 1 | 0 |
module Control.Monad.Classes.Except where
import qualified Control.Monad.Trans.Except as Exc
import qualified Control.Monad.Trans.Maybe as Mb
import qualified Control.Exception as E
import Control.Monad
import Control.Monad.Trans.Class
import GHC.Prim (Proxy#, proxy#)
import Control.Monad.Classes.Core
import Control.Mo... | strake/monad-classes.hs | Control/Monad/Classes/Except.hs | mit | 1,605 | 0 | 11 | 296 | 596 | 324 | 272 | -1 | -1 |
-- | A utility module containing data definitions common to the rest of the
-- code. This file is forbidden from having dependencies on any other part
-- of the codebase, except for other libraries (such as
-- Graphics.Rendering.OpenGL.Monad and its cousins).
--
-- In all cases, the dependency graph should be a... | bfops/Chess | src/Util/Defs.hs | mit | 661 | 0 | 5 | 131 | 43 | 32 | 11 | 4 | 0 |
-- Lists
alphabet = ['a'..'z']
-- This breaks out to the full alphabet
-- lists are lazy by default, so this pulls only the first 20
first20Mults x = take 20 [0,x..]
-- cycle creates a cycle between elements, generating a repeating sequence
-- repeat just repeats the same value over and over
first20MultsComp x = fir... | ChrisCoffey/haskell_sandbox | c_1/first_func.hs | mit | 746 | 10 | 10 | 211 | 279 | 153 | 126 | 12 | 1 |
module Mck.AST where
newtype VarId = VarId String
newtype TypeId = TypeId String
newtype Agent = Agent String
newtype ProtocolId = ProtocolId String
newtype Label = Label String
newtype Constant = Const String
data JointProtocol = JointProtocol Environment [Protocol]
data Environment = Env [TypeDec] [VarDec] [Defini... | thinkmoore/influence-checker | src/Mck/AST.hs | mit | 4,237 | 0 | 8 | 1,335 | 923 | 529 | 394 | 90 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html
module Stratosphere.ResourceProperties.FSxFileSystemWindowsConfigura... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/FSxFileSystemWindowsConfiguration.hs | mit | 5,291 | 0 | 12 | 397 | 628 | 355 | 273 | 47 | 1 |
module Graphics.Render.Light(
module L
, enlightNormal
, enlightNormal'
, enlightSimple
) where
import Prelude as P hiding ((<*))
import Graphics.Light as L
import Graphics.GPipe
import Data.Vec as Vec
import Math.Vector
-- | Transforms color with alpha-as-intensity to GPU color
liftVec4Color :: Vec4 F... | NCrashed/sinister | src/client/Graphics/Render/Light.hs | mit | 5,009 | 6 | 22 | 1,281 | 1,384 | 728 | 656 | 98 | 3 |
{-# OPTIONS -Wall #-}
import Data.Functor
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import Helpers.Grid (Grid, (!), (//))
import qualified Helpers.Grid as Grid
import Helpers.Parse
import Helpers.Point (Point (..))
import Text.Parse... | SamirTalwar/advent-of-code | 2021/AOC_25.hs | mit | 2,200 | 1 | 17 | 453 | 842 | 451 | 391 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls, OverloadedStrings, DeriveGeneric, DeriveDataTypeable #-}
{-
JQuery bindings, loosely based on fay-jquery
-}
module JavaScript.JQuery ( JQuery(..)
, Event(..)
, EventType
, Selector
... | mgsloan/ghcjs-jquery | JavaScript/JQuery.hs | mit | 28,244 | 0 | 17 | 9,560 | 8,229 | 4,201 | 4,028 | 628 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Web.Authenticate.SQRL.Client.Types where
import Web.Authenticate.SQRL.Types
import Data.ByteString (ByteString)
import Data.Text (Text)
import Control.Exception (SomeException)
import Data.Maybe (fromMaybe)
import qualified Crypto.Ed25519.Exceptio... | TimLuq/sqrl-auth-client-hs | src/Web/Authenticate/SQRL/Client/Types.hs | mit | 2,990 | 0 | 15 | 486 | 632 | 360 | 272 | 60 | 0 |
module TriggerSpec (spec) where
import Helper
import Trigger
normalize :: String -> [String]
normalize = normalizeErrors . normalizeTiming . normalizeSeed . lines . stripAnsiColors
where
normalizeTiming :: [String] -> [String]
normalizeTiming = mkNormalize "Finished in "
normalizeS... | hspec/sensei | test/TriggerSpec.hs | mit | 6,731 | 0 | 26 | 2,410 | 1,632 | 816 | 816 | 164 | 7 |
module Bonlang.Runtime.Bool
( or'
, and'
, negate'
) where
import Bonlang.Lang
import qualified Bonlang.Lang.Bool as B
import qualified Data.Map as M
import Prelude hiding (negate)
booleanOp :: PrimFunc -> BonlangValue
booleanOp f = BonlangClosure { cPar... | charlydagos/bonlang | src/Bonlang/Runtime/Bool.hs | mit | 753 | 0 | 8 | 323 | 164 | 101 | 63 | 19 | 1 |
module Files.Utils where
import qualified Control.Exception as E
import qualified System.IO as I
import System.FilePath ( splitDirectories, joinPath, (</>) )
import Data.Default
import Data.Time.Clock.POSIX
import Data.Time
import Files.Data
import System.Posix.Files
import System.Posix.Types
import System.Directory... | DronovIlya/filemanager-hs | src/Files/Utils.hs | gpl-2.0 | 2,759 | 0 | 12 | 789 | 621 | 332 | 289 | 59 | 2 |
-- Copyright 2013 Metamocracy LLC
-- Written by Jim Snow (jsnow@metamocracy.com)
--
-- This is code related to the Polink rest API and data import/export
-- for various tools.
--
-- In particular, this file defines the Aeson instances that allow us to dump
-- the reputation system graph in a format that Pariah understa... | jimsnow/polink | PolinkAPI.hs | gpl-2.0 | 17,786 | 0 | 24 | 5,290 | 6,419 | 3,363 | 3,056 | -1 | -1 |
module Muttells
( checkAlias
, getHeaders
, getBody
) where
import Text.Parsec
import Data.Maybe (maybeToList)
import Data.List (intercalate, isInfixOf)
type Parser t s = Parsec t s
------------------------
-- Mutt email parsers --
------------------------
getHeaders :: String -> [String]
getHeaders = takeWhile (/... | wcaleb/muttells | Muttells.hs | gpl-2.0 | 3,024 | 0 | 14 | 601 | 796 | 411 | 385 | 59 | 3 |
module Api where
import Rest.Api
import qualified Api.Tiddler as Tiddler
import ApiTypes (GitRestApi)
api :: Api GitRestApi
api = [(mkVersion 0 0 1, Some1 gitRest)]
gitRest :: Router GitRestApi GitRestApi
gitRest =
root -/ tiddler
where
tiddler = route Tiddler.resource
| bitraten/gitrest | src/Api.hs | gpl-3.0 | 305 | 0 | 8 | 75 | 88 | 50 | 38 | 10 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
module System.UtilsBox.Optparse where
import Prelude hiding (getLine, putStrLn, putStr)
import qualified Control.Monad.Free as F
import qualified Options.Applicative as OA
import qualified System.Exit as SE
import ... | changlinli/utilsbox | System/UtilsBox/Optparse.hs | gpl-3.0 | 1,633 | 0 | 12 | 283 | 494 | 265 | 229 | 28 | 2 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE Arrows #-}
-- ./dist/build/TaxIds2Text/TaxIds2Text -t /home/mescalin/egg/current/Projects/Haskell/TaxonomyTools/RF00169_accessionnumbers.tax -r Phylum -i /scratch/egg/taxdmpnew/ > out.csv
module Main where
import System.Console.CmdA... | eggzilla/TaxonomyTools | Biobase/TaxIds2Text.hs | gpl-3.0 | 2,626 | 0 | 25 | 566 | 563 | 288 | 275 | 47 | 4 |
module HMail.Brick.Init (
mkInitialState
, initView
) where
import HMail.Types
import Control.Concurrent.Chan
mkInitialState :: Chan Command -> Verbosity -> HMailState
mkInitialState chan verbosity =
HMailState mempty [] chan verbosity
initView :: View
initView = IsMailBoxesView (MailBoxesView Nothing)
| xaverdh/hmail | HMail/Brick/Init.hs | gpl-3.0 | 311 | 0 | 7 | 44 | 82 | 45 | 37 | 10 | 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-cloudfront/gen/Network/AWS/CloudFront/ListInvalidations.hs | mpl-2.0 | 5,245 | 0 | 14 | 1,042 | 694 | 416 | 278 | 88 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-autoscaler/gen/Network/Google/Resource/Autoscaler/Zones/List.hs | mpl-2.0 | 3,381 | 0 | 15 | 847 | 555 | 324 | 231 | 79 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/HTTPSHealthChecks/Update.hs | mpl-2.0 | 5,149 | 0 | 17 | 1,134 | 559 | 335 | 224 | 90 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Monitoring.... | brendanhay/gogol | gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs | mpl-2.0 | 295,157 | 0 | 23 | 66,697 | 45,928 | 26,639 | 19,289 | 5,043 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/RemarketingAudience/Get.hs | mpl-2.0 | 4,583 | 0 | 17 | 1,014 | 468 | 279 | 189 | 85 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Insert.hs | mpl-2.0 | 2,499 | 0 | 12 | 562 | 304 | 187 | 117 | 46 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Environments/Patch.hs | mpl-2.0 | 5,241 | 0 | 18 | 1,198 | 623 | 368 | 255 | 105 | 1 |
#!/usr/bin/env stack
-- stack --resolver lts-8.12 script
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE OverloadedStrings #-}
module E6ReadUtf8WriteUtf16 where
import qualified Data.ByteString as B
import Data.Text.Encoding as TE
e6 = main... | haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2017-05-snoyman-applied-haskell-at-lambdaconf/E6ReadUtf8WriteUtf16.hs | unlicense | 586 | 0 | 11 | 109 | 113 | 60 | 53 | 15 | 1 |
-- vim: ts=2 sw=2 et :
{-# LANGUAGE RankNTypes #-}
{- |
"Text.ParserCombinators.ReadP" instance of 'Parsing'.
-}
module Parsing.ReadP where
import Parsing
import qualified Text.ParserCombinators.ReadP as ReadP
import Text.ParserCombinators.ReadP ( readP_to_S )
import Data.Char as Ch (isDigit, isSpace)
-- | make ... | phlummox/ghci-history-parser | src/Parsing/ReadP.hs | unlicense | 1,912 | 0 | 10 | 501 | 414 | 230 | 184 | 37 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module Language.SillyStack.Instructions where
import Control.Lens
import Control.Monad.State
data Thing = TInt Integer
| TInstruction Instruction
deriving (Eq, Ord, Show)
data Instruction = PUSH Thing
| POP
| ADD
... | relrod/sillystack | src/Language/SillyStack/Instructions.hs | bsd-2-clause | 858 | 0 | 12 | 245 | 305 | 157 | 148 | 33 | 1 |
cd ../books
cd ../src
runghc Converter.hs\
--title "Numeric Haskell: A Vector Tutorial" \
--language "en-us" \
--author "hackage" \
--toc "http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial" \
--folder "../books"
| thlorenz/WebToInk | scripts/make-numerichaskellvectortutorial.hs | bsd-2-clause | 254 | 0 | 6 | 46 | 31 | 16 | 15 | -1 | -1 |
module Analysis.Types.SortsTests where
import Test.QuickCheck
import Control.Applicative
import Analysis.Types.Sorts
import Control.Applicative()
maxComplexity = 5
allSorts = foldl mkSorts [Ann,Eff] [1..(maxComplexity + 1)]
where
mkSorts s _ = s ++ concatMap (\x -> map (Arr x) s) s
instance Arbitrary Sort whe... | netogallo/polyvariant | test/Analysis/Types/SortsTests.hs | bsd-3-clause | 548 | 0 | 13 | 131 | 240 | 131 | 109 | 16 | 1 |
import Data.Char (chr, ord)
import Common.Utils (if')
import Common.Numbers.Primes (testPrime)
type Mask = [Int]
substitute :: Mask -> Int -> Int
substitute mask d = read (map (\x -> chr (x + ord '0')) (map (\x -> if' (x == -1) d x) mask))
goMask :: Int -> Int -> Int -> Mask -> Int
goMask top dep free mask = if de... | foreverbell/project-euler-solutions | src/51.hs | bsd-3-clause | 1,159 | 0 | 15 | 311 | 482 | 258 | 224 | 21 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -f... | rimmington/eclogues | eclogues-impl/app/api/Eclogues/Persist.hs | bsd-3-clause | 6,281 | 0 | 12 | 1,223 | 1,713 | 929 | 784 | 104 | 1 |
{-# LANGUAGE PostfixOperators #-}
{-# OPTIONS_HADDOCK prune #-}
----------------------------------------------------------------------------
-- |
-- Module : ForSyDe.Atom.ExB
-- Copyright : (c) George Ungureanu, 2015-2017
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : ugeorge@kth.se
-... | forsyde/forsyde-atom | src/ForSyDe/Atom/ExB.hs | bsd-3-clause | 8,397 | 0 | 13 | 2,291 | 2,624 | 1,427 | 1,197 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
module Language.Granule.Syntax.FirstParameter where
import GHC.Generics
class FirstParameter a e | a -> e where... | dorchard/gram_lang | frontend/src/Language/Granule/Syntax/FirstParameter.hs | bsd-3-clause | 1,825 | 1 | 11 | 334 | 600 | 305 | 295 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Common
import Database.PostgreSQL.Simple.Copy
import Database.PostgreSQL.Simple.FromField (FromField)
import Database.PostgreSQL.Simple.HStore
import Datab... | tomjaguarpaw/postgresql-simple | test/Main.hs | bsd-3-clause | 21,271 | 0 | 19 | 5,860 | 6,036 | 3,078 | 2,958 | -1 | -1 |
{-# LANGUAGE Rank2Types #-}
{-|
'Snap.Extension.ConnectionPool' exports the 'MonadConnectionPool' interface
which allows you to use HDBC connections in your application. These
connections are pooled and only created once. The interface's only operation
is 'withConnection'.
'Snap.Extension.ConnectionPool.ConnectionPo... | duairc/snap-extensions | src/Snap/Extension/ConnectionPool.hs | bsd-3-clause | 1,280 | 0 | 13 | 205 | 151 | 84 | 67 | 11 | 0 |
module Data.Iteratee.List.IO (
defaultBufferSize
, enumHandleSize
, enumHandle
, enumFileSize
, enumFile
) where
------------------------------------------------------------------------
-- Imports
------------------------------------------------------------------------
import Data.Iteratee.Base
import Data.Iterate... | tanimoto/iteratee | src/Data/Iteratee/List/IO.hs | bsd-3-clause | 1,781 | 0 | 9 | 202 | 379 | 222 | 157 | 40 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
{-# LANGUAGE TupleSections #-}
module Ivory.ModelCheck.Ivory2CVC4
-- ( modelCheckMod )
where
import Pre... | GaloisInc/ivory | ivory-model-check/src/Ivory/ModelCheck/Ivory2CVC4.hs | bsd-3-clause | 21,486 | 0 | 25 | 6,463 | 7,776 | 3,774 | 4,002 | 489 | 20 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-} -- FIXME
module B.Shake.Core.Rule.Internal
( ShakeValue
, Rule(..)
,... | strager/b-shake | B/Shake/Core/Rule/Internal.hs | bsd-3-clause | 1,833 | 0 | 15 | 320 | 510 | 288 | 222 | 41 | 0 |
-- 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.
{-# LANGUAGE GADT... | rfranek/duckling | Duckling/Ordinal/IT/Rules.hs | bsd-3-clause | 2,827 | 0 | 17 | 819 | 796 | 404 | 392 | 73 | 42 |
module ProjectEuler.Problem011 (solution011) where
import Util
takeWhilePN :: Int -> (a -> Bool) -> [a] -> [a]
takeWhilePN _ _ [] = []
takeWhilePN n p (x:xs) | p x = x : takeWhilePN n p xs
| otherwise = take n (x:xs)
triangles :: [Int]
triangles = 1 : map pairSum (zip triangles [2..])
f... | ThermalSpan/haskell-euler | src/ProjectEuler/Problem011.hs | bsd-3-clause | 421 | 1 | 13 | 105 | 207 | 107 | 100 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Example.Engine where
import Data.DEVS
import Data.Binary
import Data.Typeable (Typeable)
import Data.Set (Set)
import qualified Data.Set as Set
import qualified Prelude as P
import Numeric.Units.Dimensiona... | alios/lambda-devs | Example/Example/Engine.hs | bsd-3-clause | 634 | 0 | 6 | 95 | 160 | 94 | 66 | 20 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-- |
-- Module : Data.Binary.Serialise.CBOR.ByteOrder
-- Copyright : (c) Duncan Coutts 2015
-- License : BSD3-style (see LICENSE.txt)
--
-- Maintainer : duncan@community.haskell.org
-- S... | thoughtpolice/binary-serialise-cbor | Data/Binary/Serialise/CBOR/ByteOrder.hs | bsd-3-clause | 6,724 | 0 | 14 | 1,748 | 734 | 416 | 318 | -1 | -1 |
module PasswordGenerator (newPasswordBox) where
import Graphics.UI.Gtk
import Crypto.Threefish.Random
import Data.IORef
import System.IO.Unsafe
import Graphics.Rendering.Pango.Font
import Himitsu.PasswordUtils
import PasswordDialogs (passwordBox)
{-# NOINLINE prng #-}
prng :: IORef SkeinGen
prng = unsafePerformIO $ ne... | valderman/himitsu | src/PasswordGenerator.hs | bsd-3-clause | 6,212 | 0 | 14 | 1,130 | 1,533 | 708 | 825 | 131 | 1 |
{-# LANGUAGE DeriveDataTypeable
, NoImplicitPrelude
, PackageImports
, UnicodeSyntax
#-}
module Data.LList
( LList
, fromList
, toList
, cons
, (++)
, head
, safeHead
, last
, safeLast
, tail
, safeTail
, init
, null
, length
... | roelvandijk/length-list | src/Data/LList.hs | bsd-3-clause | 5,867 | 0 | 10 | 1,517 | 1,985 | 1,080 | 905 | 144 | 2 |
module Abs where
main = (abs 3, abs (-4), absFloat 4.0, absFloat (-.2.0))
| roberth/uu-helium | test/correct/Abs.hs | gpl-3.0 | 75 | 0 | 8 | 14 | 42 | 24 | 18 | 2 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="si-LK">
<title>TLS Debug | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref l... | veggiespam/zap-extensions | addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_si_LK/helpset_si_LK.hs | apache-2.0 | 971 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
module TimeMaster (timeMaster) where
import ServerMonad
import Control.Concurrent.MVar
import Data.Time.LocalTime
import System.Posix.Env
timeMaster :: TimeMasterVar -> IO ()
timeMaster tmvar
= do (timezone, mv) <- takeMVar tmvar
lt <- getLocalTimeInTimezone timezone
putMVar mv lt
timeMaster tmva... | haskell/ghc-builder | server/TimeMaster.hs | bsd-3-clause | 625 | 0 | 8 | 186 | 159 | 79 | 80 | 17 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
#ifndef MIN_VERSION_mtl
#define MIN_VERSION_mtl(x,y,z) 0
#endif
-----------------------------------------------------------------------------
-- |
-- Module ... | bitemyapp/machines | src/Data/Machine/Plan.hs | bsd-3-clause | 6,013 | 0 | 16 | 1,517 | 1,854 | 1,009 | 845 | 110 | 1 |
{-# LANGUAGE RecordWildCards #-}
module GHCJS.DOM.JSFFI.PositionError (
module Generated
, PositionErrorCode(..)
, PositionException(..)
, throwPositionException
) where
import Control.Exception (Exception, throwIO)
import Control.Monad.IO.Class (MonadIO(..))
import GHCJS.DOM.JSFFI.Generated.PositionError a... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/PositionError.hs | mit | 913 | 0 | 12 | 140 | 221 | 127 | 94 | 19 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/DeleteUser.hs | mpl-2.0 | 2,750 | 0 | 9 | 636 | 330 | 203 | 127 | 45 | 1 |
module X (foo) where
foo = 10
| itchyny/vim-haskell-indent | test/module/export.out.hs | mit | 30 | 0 | 4 | 7 | 14 | 9 | 5 | 2 | 1 |
{-# OPTIONS_JHC -fno-prelude -fm4 #-}
module Jhc.Inst.Read() where
import Prelude.Text
import Jhc.Basics
import Jhc.Float
import Prelude.Float
import Jhc.Num
import Numeric(showSigned, showInt, readSigned, readDec, showFloat,
readFloat, lexDigits)
-- Reading at the Integer type avoids
-- possible diff... | m-alvarez/jhc | lib/jhc/Jhc/Inst/Read.hs | mit | 1,136 | 6 | 13 | 273 | 400 | 226 | 174 | -1 | -1 |
module Layout.Default where
default (Float,Integer,Double)
foo = 5
| RefactoringTools/HaRe | test/testdata/Layout/Default.hs | bsd-3-clause | 70 | 0 | 4 | 11 | 23 | 15 | 8 | 3 | 1 |
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.STRef.Lazy
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : ... | frantisekfarka/ghc-dsi | libraries/base/Data/STRef/Lazy.hs | bsd-3-clause | 1,152 | 0 | 9 | 248 | 235 | 133 | 102 | 18 | 1 |
import qualified Data.Map as M
main :: IO ()
main = interact parseExpensesFile
parseExpensesFile :: String -> String
parseExpensesFile f = show $ calcRatePerDay $ sanityCheck $ map words $ lines f
calcRatePerDay :: [(String, Double, String)] -> Double
calcRatePerDay xl = (sum $ map (\(_, v) -> v) dayRateList) / (fro... | fredmorcos/attic | projects/pet/archive/pet_expenses_haskell_tmp_1/Main.hs | isc | 988 | 1 | 11 | 296 | 336 | 180 | 156 | 17 | 2 |
-- | This module contains functions that act on factions.
module Game.Cosanostra.Faction
( factionMembers
, effectsFaction
, winners
) where
import Game.Cosanostra.Effect
import Game.Cosanostra.Lenses
import Game.Cosanostra.Types
import Control.Lens
import Data.Maybe
import qualified Data.Set as S
--... | rfw/cosanostra | src/Game/Cosanostra/Faction.hs | mit | 2,675 | 0 | 17 | 885 | 601 | 309 | 292 | -1 | -1 |
{-
Copyright (C) 2015 Braden Walters
This file is licensed under the MIT Expat License. See LICENSE.txt.
-}
{-# LANGUAGE QuasiQuotes #-}
module Output.CPP (outputCpp) where
import Data.List (intersperse, sortBy)
import FollowTable
import Rules
import StartEndTable
import StateTable
import Text.RawString.QQ
outputCp... | meoblast001/lexical-analyser-generator | src/Output/CPP.hs | mit | 11,472 | 0 | 18 | 2,697 | 2,061 | 1,128 | 933 | 123 | 4 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import Import
import App.Pieces
import App.UTCTimeP
import Data.Text as T
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majo... | TimeAttack/time-attack-server | Handler/Home.hs | mit | 1,346 | 0 | 13 | 310 | 270 | 141 | 129 | 30 | 2 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
module Db.PlaceCategory
( PlaceCategory'(PlaceCategory)
, NewPlaceCategory
, Pla... | benkolera/talk-stacking-your-monads | code-classy/src/Db/PlaceCategory.hs | mit | 2,004 | 1 | 11 | 338 | 444 | 240 | 204 | 52 | 1 |
module Parse
(
totalCents,
purchaseDate,
maybeToEither
) where
import Text.Read as R
import Data.List as DL
import Data.Char (isDigit)
import Data.Time.Calendar
import Data.Time.Format as DF
import Data.Time.Clock
totalCents :: String -> Either String Int
totalCents "" = Left "empty input"
t... | fsvehla/steam-analytics | src/Parse.hs | mit | 1,544 | 3 | 18 | 368 | 501 | 253 | 248 | 36 | 4 |
module Main
( main
)
where
-- doctest
import qualified Test.DocTest as DocTest
main :: IO ()
main =
DocTest.doctest
[ "-isrc"
, "src/AParser.hs"
]
| mauriciofierrom/cis194-homework | homework10/test/examples/Main.hs | mit | 170 | 0 | 6 | 48 | 44 | 27 | 17 | 8 | 1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedLabels #-}
module Examples.Rpc.CalculatorClient (main) where
import qualified Capnp.New as C
import Capnp.Rpc
(ConnConfig(..), fromClient, handleConn, socketTransport)
import Contr... | zenhack/haskell-capnp | examples/lib/Examples/Rpc/CalculatorClient.hs | mit | 2,681 | 0 | 37 | 1,220 | 615 | 320 | 295 | 55 | 1 |
module Tree.Lists where
import Tree.Types
import Tree.BTree
import Tree.Balanced (insert)
-- IN-order traversal.
-- 1. traverse left. 2. visit root. 3. traverse right.
inOrdList :: BTree a -> [a]
inOrdList = foldTree (\v lRes rRes -> lRes ++ v : rRes) []
-- POST-order traversal.
-- 1. traverse left. 2. traverse r... | marklar/elm-fun | BTree/Tree/Lists.hs | mit | 1,169 | 0 | 9 | 245 | 314 | 173 | 141 | 18 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds, ConstraintKinds, PolyKinds #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module GrammarGen where
import Generics.SOP
import Random
class Gen a where
gen :: Mon... | vladfi1/hs-misc | GrammarGen.hs | mit | 780 | 0 | 12 | 163 | 285 | 153 | 132 | 20 | 2 |
module Util where
import qualified System.Random.MWC as MWC
import Data.ByteVector (fromByteVector)
import System.IO.Temp (withSystemTempFile)
import Data.ByteString.Lazy.Internal (defaultChunkSize)
import System.IO (hClose)
import Conduit
import Control.Monad.Catch (MonadMask)
import Data.Time (getCurrentTime, diffUT... | snoyberg/bytevector | bench/Util.hs | mit | 1,050 | 0 | 17 | 278 | 332 | 167 | 165 | 32 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Graphics.Tracy.Color
( -- * Colors
Color (..)
, from256
, Alpha
, blending
-- * Literals
, white
, gray
, black
, red
, green
, blue
, cyan
, magenta
, yell... | pxqr/tracy | src/Graphics/Tracy/Color.hs | mit | 1,504 | 0 | 11 | 467 | 493 | 283 | 210 | 52 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module CodeGen where
import Prelude
import Data.List
import qualified Data.Map as HashMap
import qualified LLIR
import LLIR hiding (blockName)
import Text.Printf
data CGContext = CGContext {
-- label, constant string
constStrs :: HashMap.Map String String,
nextConstStrId ::... | Slava/6.035-decaf-compiler | src/CodeGen.hs | mit | 25,071 | 6 | 25 | 7,231 | 8,959 | 4,647 | 4,312 | 552 | 23 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
module Pitch.Players.Network
where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Control.Monad.Writer
import Data.Aeson (ToJSON, toJSON, FromJSON, fromJSON, encode, decode, Value (..), object, (.:), (.=), parseJSON, (.... | benweitzman/Pitch | src/Pitch/Players/Network.hs | mit | 8,028 | 0 | 20 | 3,504 | 2,093 | 1,086 | 1,007 | 141 | 6 |
{-# LANGUAGE FlexibleInstances #-}
module Model where
import ClassyPrelude.Yesod
import Database.Persist.Quasi
import ModelTypes
import Yesod.Auth.HashDB (HashDBUser(..))
-- You can define all of your database entities in the entities file.
-- You can find more information on persistent and how to declare entities
-... | ahushh/Monaba | monaba/src/Model.hs | mit | 603 | 0 | 8 | 88 | 101 | 58 | 43 | -1 | -1 |
-- Multiples of Ten in a Sequence Which Values Climb Up
-- http://www.codewars.com/kata/561d54055e399e2f62000045/
module Codewars.Kata.ClimbUp where
import Control.Arrow ((&&&))
findMult10SF :: Int -> Integer
findMult10SF = uncurry (+) . ((*3) . (2^) &&& (*9) . (6^)) . (+ (-3)) . (*4)
| gafiatulin/codewars | src/Beta/ClimbUp.hs | mit | 289 | 0 | 12 | 44 | 96 | 61 | 35 | -1 | -1 |
{-
Model of explosion of buried curved charge.
Proposed by L. M. Kotlyar in 1970's
Makes possible the calculations of blast edges given set parameters.
Explosion is modelled as potential flow of ideal liquid.
Encoded by Saphronov Mark a. k. a. hijarian
2011.09
Public Domain
-}
module Model.Functions (
dzdu,
dzdu',... | hijarian/AFCALC | program/src/Model/Functions.hs | cc0-1.0 | 8,074 | 1 | 17 | 1,672 | 2,351 | 1,249 | 1,102 | 98 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Lambda.Backward_Join.Solution where
import Lambda.Type
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data Type = Make
{ start :: Lambda
, left_steps :: [ Int ]
, right_steps :: [ Int ]
}
deri... | Erdwolf/autotool-bonn | src/Lambda/Backward_Join/Solution.hs | gpl-2.0 | 581 | 0 | 9 | 167 | 141 | 86 | 55 | 17 | 1 |
module Text.Pandoc.CrossRef.Util.CustomLabels (customLabel) where
import Text.Pandoc.Definition
import Text.Pandoc.CrossRef.Util.Meta
import Control.Monad
import Data.List
import Text.Numeral.Roman
customLabel :: Meta -> String -> Int -> Maybe String
customLabel meta ref i
| refLabel <- takeWhile (/=':') ref
, Ju... | infotroph/pandoc-crossref | lib/Text/Pandoc/CrossRef/Util/CustomLabels.hs | gpl-2.0 | 802 | 0 | 12 | 151 | 320 | 161 | 159 | 23 | 1 |
module Main ( main ) where
import Test.Framework (defaultMain, testGroup, Test)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2 (testProperty)
-- import Test.QuickCheck
import Test.HUnit hiding (Test)
import Handy.List
main :: IO ()
main = defaultMain tests
tests :: [Test]
tests =... | xkollar/handy-haskell | handy/test/HandyTest.hs | gpl-3.0 | 2,616 | 0 | 12 | 562 | 674 | 372 | 302 | 61 | 1 |
module Main where
import Data.Char (toLower)
import Data.Set (Set, fromList, member)
import GameState
import System.IO (IOMode (ReadMode), hGetContents, openFile)
import System.Random (getStdGen, randomR)
getWordsLst :: IO [String]
getWordsLst = do
hand... | dasdy/Hangman | src/Main.hs | gpl-3.0 | 736 | 0 | 15 | 190 | 244 | 127 | 117 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Sets.Controller where
import Control.Monad.Trans.Either (runEitherT)
import qualified Data.Text as T
import Network.Wai (Response)
import Web.Fn
import Ctxt
import Kiss
import Sets.Vi... | huggablemonad/smooch | app/src/Sets/Controller.hs | gpl-3.0 | 1,636 | 0 | 13 | 412 | 382 | 200 | 182 | 28 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/AuthInfo.hs | mpl-2.0 | 2,393 | 0 | 12 | 536 | 222 | 138 | 84 | 42 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-clouderrorreporting/gen/Network/Google/Resource/CloudErrorReporting/Projects/DeleteEvents.hs | mpl-2.0 | 5,001 | 0 | 16 | 1,104 | 702 | 411 | 291 | 104 | 1 |
module Ch5Exercises where
-- multiple choice:
-- 1 -> c
-- 2. a
-- 3. b
-- 4. c
func1a = (* 9) 6
func1b = head [(0,"doge"),(1,"kitteh")]
func1c = head [(0 :: Integer, "doge"),(1,"kitteh")]
func1d = if False then True else False
func1e = length [1,2,3,4,5]
func1f = (length [1,2,3,4]) > (length "TACOCAT")
| thewoolleyman/haskellbook | 05/09/maor/ch5Exercises.hs | unlicense | 310 | 0 | 8 | 59 | 145 | 90 | 55 | 7 | 2 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- The generic imp... | krapsh/kraps-haskell | src/Spark/Core/Internal/RowGenerics.hs | apache-2.0 | 3,263 | 0 | 13 | 647 | 938 | 488 | 450 | 69 | 1 |
{-# LANGUAGE TypeFamilies, OverloadedLists, FlexibleInstances, FunctionalDependencies, ViewPatterns, MultiParamTypeClasses, UnicodeSyntax, GeneralizedNewtypeDeriving #-}
module Fuzzy.Bool where
import Prelude.Unicode
import Control.Applicative
import Data.Monoid
import GHC.Exts
class Adjunct f u | f → u where
for... | edgarklerks/document-indexer | Fuzzy/Bool.hs | bsd-2-clause | 2,977 | 0 | 13 | 907 | 998 | 537 | 461 | 55 | 1 |
{-# LANGUAGE RankNTypes #-}
module Graphics.GL.Low.Framebuffer (
-- | By default, rendering commands output graphics to the default framebuffer.
-- This includes the color buffer, the depth buffer, and the stencil buffer. It
-- is possible to render to a texture instead. This is important for many
-- techniques. Rende... | sgraf812/lowgl | Graphics/GL/Low/Framebuffer.hs | bsd-2-clause | 8,157 | 0 | 13 | 1,664 | 918 | 573 | 345 | 67 | 1 |
module Data.CRF.Chain2.Tiers.DP
( table
, flexible2
, flexible3
) where
import qualified Data.Array as A
import Data.Array ((!))
import Data.Ix (range)
table :: A.Ix i => (i, i) -> ((i -> e) -> i -> e) -> A.Array i e
table bounds f = table' where
table' = A.listArray bounds
$ map (f (table' !))
... | kawu/crf-chain2-tiers | src/Data/CRF/Chain2/Tiers/DP.hs | bsd-2-clause | 1,339 | 0 | 15 | 430 | 730 | 393 | 337 | 36 | 1 |
{-|
Module : Database.Relational.FieldType
Description : Definition of FieldType and friends.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE TypeFamilies... | avieth/Relational | Database/Relational/FieldType.hs | bsd-3-clause | 2,284 | 0 | 8 | 422 | 392 | 234 | 158 | 32 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE TemplateHaskell #-}
-- | This module contains operations related to symbolic stack.
module Toy.X86.SymStack
( regSymStack
, atSymStack
, SymStackSpace
, SymStackHolder
, runSymStackHold... | Martoon-00/toy-compiler | src/Toy/X86/SymStack.hs | bsd-3-clause | 2,788 | 0 | 12 | 630 | 775 | 419 | 356 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Test.ScopeLookup where
import Language.Haskell.TH
import NotCPP.ScopeLookup
scopeLookupTest = $(do
Just t <- scopeLookup' "True"
return t)
| bmillwood/notcpp | Test/ScopeLookup.hs | bsd-3-clause | 186 | 0 | 10 | 28 | 46 | 24 | 22 | 7 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE... | haskell-distributed/distributed-process-registry | src/Control/Distributed/Process/Registry.hs | bsd-3-clause | 41,815 | 66 | 26 | 10,991 | 9,833 | 5,212 | 4,621 | -1 | -1 |
module Diag.Util.Encoding
where
import Data.Char
import Data.Word
import Data.Bits
import Numeric
import Data.List
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString as S
int2Word8 x = fromIntegral x :: Word8
word8ToInt x = fromIntegral x :: Int
encodeInt :: (Integral a, Bits a) => a -> Int... | marcmo/hsDiagnosis | src/Diag/Util/Encoding.hs | bsd-3-clause | 1,777 | 4 | 11 | 380 | 617 | 343 | 274 | 48 | 1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
module Language.C.CPPPP.Transforms.Chs (mkChs, mkObjChs) where
import Language.C.CPPPP.Transforms.CTypes
import qualified Language.C.Syntax as C
import Language.C.Quote.C
import Data.Loc (SrcLoc)
import Data.List
import Language.Haskell.TH hiding (varP)
import System.IO
m... | mxswd/cpppp | Language/C/CPPPP/Transforms/Chs.hs | bsd-3-clause | 2,463 | 0 | 15 | 483 | 940 | 492 | 448 | 47 | 1 |
{-# OPTIONS -Wall #-}
{-|
Module : Esge.Base
Description : Highlevel basic esge module.
Copyright : (c) Simon Goller, 2015
License : BSD
Maintainer : neosam@posteo.de
Basic required functions in order create a game.
They are higher level and let you for example move Individuals.
Many features are introduc... | neosam/esge | src/Esge/Base.hs | bsd-3-clause | 8,528 | 0 | 16 | 2,160 | 2,077 | 1,053 | 1,024 | 178 | 2 |
module TestData where
import Data.IntMap as IMap
import Data.Set as Set
data Codegen = C | JS deriving (Show, Eq, Ord)
type Index = Int
data CompatCodegen = ANY | C_CG | NODE_CG | NONE
-- A TestFamily groups tests that share the same theme
data TestFamily = TestFamily {
-- A shorter lowcase name to use in filename... | uuhan/Idris-dev | test/TestData.hs | bsd-3-clause | 8,201 | 0 | 13 | 3,588 | 2,964 | 1,934 | 1,030 | 300 | 4 |
module HLearn.Data.UnsafeVector
( setptsize
)
where
import Control.DeepSeq
import Control.Monad
import Data.IORef
import Debug.Trace
import qualified Data.Foldable as F
import Data.Primitive
import Data.Primitive.MachDeps
import qualified Data.Vector.Generic as VG
import qualified Data.Vector.Generic.Mutab... | iamkingmaker/HLearn | src/HLearn/Data/UnsafeVector.hs | bsd-3-clause | 7,912 | 26 | 16 | 1,953 | 1,897 | 1,029 | 868 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
module Test0 () where
import LiquidHaskell
[lq| thing :: Int -> x:Int |]
thing = undefined
| spinda/liquidhaskell | benchmarks/gsoc15/neg/test5.hs | bsd-3-clause | 124 | 0 | 4 | 24 | 23 | 16 | 7 | 5 | 1 |
{-# LANGUAGE DoRec, GeneralizedNewtypeDeriving #-}
module Language.Brainfuck.CompileToIA32 (compile) where
import qualified Language.Brainfuck.Syntax as BF
import Language.IA32.Syntax
import Control.Monad.RWS
newtype Compiler a = Compiler { runCompiler :: RWS () [Directive] Label a } deriving (Monad, MonadFix)
... | gergoerdi/brainfuck | language-brainfuck/src/Language/Brainfuck/CompileToIA32.hs | bsd-3-clause | 2,123 | 0 | 13 | 710 | 932 | 470 | 462 | 55 | 6 |
{-# OPTIONS -XDeriveDataTypeable -XCPP #-}
module ShopCart ( shopCart) where
import Data.Typeable
import qualified Data.Vector as V
import Text.Blaze.Html5 as El
import Text.Blaze.Html5.Attributes as At hiding (step)
import Data.Monoid
import Data.String
import Data.Typeable
-- #define ALONE -- to execute it alone, un... | agocorona/MFlow | Demos/ShopCart.hs | bsd-3-clause | 2,856 | 0 | 35 | 881 | 656 | 351 | 305 | 49 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.