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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Control.Lens.Action.Extras (perform_) where
import Control.Lens
import Control.Lens.Internal.Action
import Data.Profunctor.Unsafe
perform_ :: Monad m => Acting m () s a -> s -> m ()
perform_ l = getEffect #. l (Effect #. const (return ()))
| sonyandy/wart-lens | src/Control/Lens/Action/Extras.hs | bsd-3-clause | 249 | 0 | 12 | 38 | 100 | 54 | 46 | 6 | 1 |
module SecondTransfer.Utils.Alarm
(
newAlarm,
cancelAlarm,
Alarm,
AlarmCancelResult
)
where
import Control.Concurrent
-- import Control.Concurrent.MVar
data AlarmCancelResult a =
Success_ACR
|AlreadyFired_ACR (MVar a)
data AlarmState =
Waiting
|C... | shimmercat/second-transfer | hs-src/SecondTransfer/Utils/Alarm.hs | bsd-3-clause | 1,378 | 0 | 20 | 463 | 346 | 172 | 174 | 40 | 3 |
{- |
Module : $Header$
Copyright : (c) Florian Mossakowski, Uni Bremen 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : till@informatik.uni-bremen.de
Stability : provisional
Portability : portable
parse terms and formulae
-}
module ConstraintCASL.Formula where
import Common.AnnoState... | keithodulaigh/Hets | ConstraintCASL/Formula.hs | gpl-2.0 | 3,416 | 0 | 13 | 810 | 956 | 463 | 493 | 102 | 1 |
module Reddit.Routes.Flair where
import Reddit.Types.Options
import Reddit.Types.Subreddit
import Reddit.Types.User
import Data.Text (Text)
import Network.API.Builder.Routes
import qualified Data.Text as Text
flairList :: Options UserID -> SubredditName -> Route
flairList opts (R r) =
Route [ "r", r, "api", "flair... | FranklinChen/reddit | src/Reddit/Routes/Flair.hs | bsd-2-clause | 1,070 | 0 | 11 | 258 | 359 | 201 | 158 | 29 | 1 |
{-|
Module : Language.Qux.Llvm.Builder
Description : Build utilities for the LLVM compiler.
Copyright : (c) Henry J. Wylde, 2015
License : BSD3
Maintainer : hjwylde@gmail.com
Build utilities for the LLVM compiler, see "Compiler".
-}
{-# OPTIONS_HADDOCK hide, prune #-}
{-# LANGUAGE FlexibleContexts #-}
{... | hjwylde/qux-haskell | src/Language/Qux/Llvm/Builder.hs | bsd-3-clause | 2,503 | 0 | 11 | 518 | 681 | 353 | 328 | -1 | -1 |
{-|
Module : Idris.Elab.Term
Description : Code to elaborate terms.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE LambdaCase, PatternGuards, ViewPatterns #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Elab.Term where
import Idris.AbsSyntax
import Idris.AbsSyn... | Heather/Idris-dev | src/Idris/Elab/Term.hs | bsd-3-clause | 130,762 | 1,309 | 29 | 56,449 | 25,734 | 14,954 | 10,780 | 2,316 | 249 |
{-# LANGUAGE BangPatterns, CPP, NondecreasingIndentation, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
-- NB: we specifically ignore deprecations. GHC 7.6 marks the .QSem module as
-- deprecated, although it became un-deprecated later. As a result, using 7.6
-- as your bootstrap compiler ... | lukexi/ghc | compiler/main/GhcMake.hs | bsd-3-clause | 83,069 | 992 | 25 | 26,383 | 12,111 | 7,017 | 5,094 | -1 | -1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
import Cryptol.Parser.Lexer
import Cryptol.Parser.PP
main :: IO ()
main = interact (unlines . map (show . pp) . fst . primLe... | iblumenfeld/cryptol | tests/parser/RunLexer.hs | bsd-3-clause | 325 | 1 | 12 | 72 | 66 | 37 | 29 | 4 | 1 |
module LeftSectionIn1 where
{- map2 xs = map (+ 1) xs -}
map2 xs = (case ((+ 1), xs) of
(f, []) -> []
(f, (x : xs)) -> (f x) : (map2 xs))
| kmate/HaRe | old/testing/generativeFold/LeftSectionIn1_TokOut.hs | bsd-3-clause | 171 | 0 | 11 | 67 | 81 | 47 | 34 | 4 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for 'Ganeti.THH.Types'.
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. R... | leshchevds/ganeti | test/hs/Test/Ganeti/THH/Types.hs | bsd-2-clause | 2,385 | 0 | 11 | 371 | 215 | 125 | 90 | 23 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
module ValidSubsInteractions where
import Data.Kind
data SBool :: Bool -> Type where
SFalse :: SBool 'False
STrue :: SBool 'True
f :: SBool 'True
f = _
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.hs | bsd-3-clause | 242 | 0 | 7 | 49 | 58 | 34 | 24 | 10 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE Safe #-}
module T10598_fail3 where
import GHC.Generics
data T = MkT Int deriving anyclass Generic
| olsner/ghc | testsuite/tests/deriving/should_fail/T10598_fail3.hs | bsd-3-clause | 181 | 0 | 6 | 27 | 26 | 17 | 9 | 6 | 0 |
-- !!! Multiple modules per file
module M where
foo = 'a'
module N where
bar = 'b'
| siddhanathan/ghc | testsuite/tests/module/mod76.hs | bsd-3-clause | 85 | 0 | 5 | 20 | 22 | 13 | 9 | -1 | -1 |
module Control.Concurrent.Transactional.Var (
module Control.Concurrent.Transactional.Var.Class,
module Control.Concurrent.Transactional.Var.Buffer,
module Control.Concurrent.Transactional.Var.Mutable,
module Control.Concurrent.Transactional.Var.Immutable
) where
import Control.Concurrent.Transactional... | YellPika/Hannel | src/Control/Concurrent/Transactional/Var.hs | mit | 488 | 0 | 5 | 38 | 78 | 59 | 19 | 9 | 0 |
module Main where
import Hello
main =
sayHello "GoatScreams McGee"
| mikegehard/haskellBookExercises | call-em-up/src/Main.hs | mit | 74 | 0 | 5 | 17 | 15 | 9 | 6 | 4 | 1 |
module Melvin (
doAMelvin
) where
import Control.Concurrent.Lifted
import Control.Concurrent.Async.Lifted
import Control.Monad
import Control.Monad.Fix
import Data.Set
import Melvin.Client as Client
import Melvin.Damn as Damn
import Melvin.Client.Auth
import Melvin.Exception
import Melvin.Prelude hiding (index, s... | pikajude/melvin | src/Melvin.hs | mit | 3,472 | 0 | 16 | 1,040 | 979 | 517 | 462 | -1 | -1 |
module Graphics.Urho3D.UI.Internal.Text3D(
Text3D
, text3DCntx
, sharedText3DPtrCntx
, SharedText3D
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types as C
import Graphics.Urho3D.Container.Ptr
import qualified Data.Map as Map
d... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Internal/Text3D.hs | mit | 492 | 0 | 11 | 87 | 120 | 80 | 40 | -1 | -1 |
-- Copyright 2015 Mitchell Kember. Subject to the MIT License.
import Data.Char (toLower, chr, ord)
import Data.List (genericLength, minimumBy)
import Data.Ord (comparing)
import qualified Data.Map as M
-- Relative letter frequencies of English (http://norvig.com/mayzner.html).
englishFreqs :: (Fractional a) => [a]
e... | mk12/algorithms | caesar.hs | mit | 2,382 | 0 | 14 | 515 | 755 | 418 | 337 | 37 | 1 |
--------------------------------------------------------------------------
--
-- Haskell: The Craft of Functional Programming, 3e
-- Simon Thompson
-- (c) Addison-Wesley, 1996-2011.
--
-- Chapter 4
--
--------------------------------------------------------------------------
-- NOTE
--
-- Added HUnit and QuickChec... | tonyfloatersu/solution-haskell-craft-of-FP | Chapter4.hs | mit | 8,408 | 0 | 12 | 2,243 | 2,621 | 1,373 | 1,248 | 173 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.IDBVersionChangeEvent (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.IDBVersionChangeEvent
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/IDBVersionChangeEvent.hs | mit | 376 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
{-|
This module provides every single type defined within the spice framework.
This allows people to write functions on data structures without being
concerned about recursive imports (and thereby being unable to compile) due
to the fact that this file does not and WILL NEVER import any other local libraries.
-... | crockeo/spice | src/FRP/Spice/Internal/Types.hs | mit | 5,823 | 0 | 13 | 1,708 | 910 | 505 | 405 | 68 | 0 |
module Unfold where
-- take 10 $ myIterate (+1) 0
myIterate :: (a -> a) -> a -> [a]
myIterate f x = x : myIterate f (f x)
myUnfoldr :: (b -> Maybe (a, b)) -> b -> [a]
myUnfoldr f x = myUnfoldr' x'
where x' = f x
myUnfoldr' Nothing = []
myUnfoldr' (Just (y, z)) = y : myUnfoldr f z
-- take 10 $ myIt... | JoshuaGross/haskell-learning-log | Code/Haskellbook/Unfold.hs | mit | 437 | 0 | 12 | 118 | 213 | 113 | 100 | 10 | 2 |
module Main where
import Control.Monad
import System.Environment
import BankHolidayService.Server (runServer)
import qualified Control.Exception as Exception
-- | Main application init
main :: IO ()
main = do
let port = 8081 :: Int
putStrLn ("Starting on port " ++ show port ++ "...")
Exception.catch
(runSe... | tippenein/BankHolidayService | src/Main.hs | mit | 391 | 0 | 11 | 68 | 109 | 59 | 50 | 12 | 1 |
{-# OPTIONS_GHC -w #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
{-# LANGUAGE TupleSections #-}
module Logistic where
import Numeric.AD
import qualified Data.Vector as V
import Control.Monad
import Control.Monad.State
import... | syllogismos/machine-learning-haskell | Logistic.hs | mit | 4,161 | 8 | 18 | 1,388 | 1,540 | 804 | 736 | 115 | 4 |
-- Sum of numbers from 0 to N
-- http://www.codewars.com/kata/56e9e4f516bcaa8d4f001763
module Sequence.JorgeVS.Kata where
import Data.List (intercalate)
sequenceSum :: Int -> String
sequenceSum n | n < 0 = show n ++ " < 0"
| n == 0 = "0 = 0"
| otherwise = (intercalate "+" . map show $ [0.... | gafiatulin/codewars | src/7 kyu/Sum0ToN.hs | mit | 360 | 0 | 12 | 92 | 128 | 67 | 61 | 6 | 1 |
-- Write a sort that takes a list and a function that compares its two arguments
-- and then returns a sorted list.
module Main where
import Data.List
sortByComparator :: Eq a => [a] -> (a -> a -> Integer) -> [a]
sortByComparator [] comparator = []
sortByComparator xs comparator = minx:(sortByComparator (dele... | ryanplusplus/seven-languages-in-seven-weeks | haskell/day2/sort_with_comparator.hs | mit | 505 | 0 | 10 | 132 | 142 | 76 | 66 | 10 | 2 |
module SDLTools
( wipe
, pollEvents ) where
import Graphics.UI.SDL as SDL
-- wipe clears a surface (paints it black)
wipe :: Surface -> IO Bool
wipe surface = fillRect surface Nothing (Pixel $ 0)
-- Poll Events gets all the pending events in one go for processing
pollEvents :: IO [SDL.Event]
pollEvents = do
event... | rlupton20/yampaTutorial | src/SDLTools.hs | cc0-1.0 | 408 | 0 | 10 | 78 | 115 | 64 | 51 | 10 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module DarkPlaces.Text.Lexer (
dptextToken,
maybeDPTextToken
) where
import Data.Attoparsec.ByteString hiding (takeWhile1)
import Data.Attoparsec.ByteString.Char8 (isDigit_w8, char, takeWhile1)
import Control.Applicative
import DarkPlaces.Text.Types
import Data.Word
import Dat... | bacher09/darkplaces-text | src/DarkPlaces/Text/Lexer.hs | gpl-2.0 | 1,515 | 0 | 15 | 346 | 535 | 288 | 247 | 36 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Fresh.BuiltIn where
import Fresh.Types
import Fresh.Module (Module(..))
import Fresh.Expr (Expr(..), EVarName(..), ETypeAsc(..))
import Fresh.Kind (Kind(..))
import qualified Data.Map as Map
tcon :: String -> Type
tcon x = Fix $ TyCon $ TCon (Id x) Star
_String :: Type
_St... | sinelaw/fresh | src/Fresh/BuiltIn.hs | gpl-2.0 | 3,150 | 0 | 10 | 813 | 1,046 | 580 | 466 | 90 | 1 |
module Access.Data.Time.Clock
( module Data.Time.Clock
, ClockAccess(..)
) where
import Data.Time.Clock
import Access.Core
class Access io => ClockAccess io where
getCurrentTime' :: io UTCTime
instance ClockAccess IO where
getCurrentTime' = getCurrentTime
| bheklilr/time-io-access | Access/Data/Time/Clock.hs | gpl-2.0 | 283 | 0 | 7 | 58 | 72 | 42 | 30 | 9 | 0 |
{-# LANGUAGE BangPatterns #-}
{-| Implementation of configuration reader with watching support.
-}
{-
Copyright (C) 2011, 2012, 2013 Google 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; ei... | narurien/ganeti-ceph | src/Ganeti/ConfigReader.hs | gpl-2.0 | 11,914 | 0 | 16 | 2,884 | 2,345 | 1,206 | 1,139 | 199 | 5 |
{-# LANGUAGE DeriveGeneric #-}
module StandOff.AttributesMap
( AttributesMap
, AttributeMap(..)
, ValueMap
, Attribute(..)
, mapExternal
, serializeXml
, specialAttrs
, parseMapping
, updSplitNumbers
)
where
-- | This module provides types and functions for mapping features
-- (attributes) of exter... | lueck/standoff-tools | src/StandOff/AttributesMap.hs | gpl-3.0 | 5,391 | 0 | 15 | 967 | 1,099 | 602 | 497 | 82 | 1 |
import Data.Char
import Data.List.Split
import Handy
import qualified Data.Map as Map
import Data.List
import System.IO
inputTraits = "20266440 22220150 30270160 36237440 22060560 34064556 31271563\
\ 10064563 10060440 33262544 32267543 34462440 34672141 33462141\
\ 34462040 31467562 10060440... | xkollar/handy-haskell | other/okc-NBTheRain/Main.hs | gpl-3.0 | 1,320 | 2 | 9 | 246 | 164 | 83 | 81 | 12 | 1 |
a -> a | hmemcpy/milewski-ctfp-pdf | src/content/1.10/code/haskell/snippet26.hs | gpl-3.0 | 6 | 1 | 5 | 2 | 10 | 3 | 7 | -1 | -1 |
module Sites.FeyWinds
( feyWinds
) where
import Control.Monad
import Data.Maybe (catMaybes)
import Network.HTTP.Types.URI (decodePathSegments)
import Pipes
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.UTF8 as US
import qualified Data.List as DL
import qualified Data.Text as T
-... | pharaun/hComicFetcher | src/Sites/FeyWinds.hs | gpl-3.0 | 3,874 | 0 | 28 | 1,145 | 1,430 | 753 | 677 | 70 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs | mpl-2.0 | 7,965 | 0 | 21 | 1,665 | 904 | 538 | 366 | 127 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Sparkle.Handlers where
import Data.Acid (AcidState)
import Happstack.Server
import Web.Routes (RouteT)
import Web.Routes.Happstack ()
import Sparkle.Common
import Sparkle.Routes
import Sparkle.Templates
import Sparkle.Types
type SparkleM a = RouteT Sitemap (ReaderT (AcidSta... | lfairy/sparkle | Sparkle/Handlers.hs | agpl-3.0 | 632 | 0 | 13 | 119 | 190 | 98 | 92 | 19 | 1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-|
Module : Data.PolyMap.Storage.List
Copyright : (c) 2015 David Farrell
License : PublicDomain
Stability : unstable
Portability : non-portable (GHC extensions)
Storage instance for lists.
-}
mod... | shockkolate/hs-polymap | src/Data/PolyMap/Storage/List.hs | unlicense | 784 | 0 | 11 | 271 | 221 | 113 | 108 | 19 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- | Lift operations that lift up values from database to domain.
module Lycopene.Database.Relational.Lift where
import Data.Maybe (fromMaybe)
import Data.UUID (fromString)
import Lycopene.Database (Persist)
import qualified Lycopene.Database.Relatio... | utky/lycopene | src/Lycopene/Database/Relational/Lift.hs | apache-2.0 | 955 | 0 | 11 | 230 | 207 | 116 | 91 | 18 | 0 |
module System.IO.FileSystem where
import System.IO.Exception
import System.IO.UV.Internal
import System.IO.UV.Exception
import Foreign.Ptr
import Foreign.C
import Data.CBytes
scandir :: CBytes -> IO [(CBytes, UVDirEntType)]
scandir path = withCBytes path $ \ p ->
withResource (initUVReq uV_FS) $ \ req -> do
... | winterland1989/stdio | System/IO/FileSystem.hs | bsd-3-clause | 875 | 0 | 20 | 341 | 261 | 133 | 128 | 26 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Language.Whippet.Parser.FunctionSpec where
import Control.Lens
import Control.Lens.Extras
import Control.Monad (when)
import Data.Text (Text)
import Language.Whippet.Parser.Lenses
i... | chrisbarrett/whippet | test/Language/Whippet/Parser/FunctionSpec.hs | bsd-3-clause | 8,265 | 0 | 20 | 3,082 | 1,634 | 765 | 869 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TupleSections #-}
{-# OP... | zohl/postgresql-simple-bind | tests/Test/PGType.hs | bsd-3-clause | 4,609 | 0 | 16 | 1,204 | 1,226 | 689 | 537 | 123 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_NV_compute_shader_derivatives - device extension
--
-- == VK_NV_compute_shader_derivatives
--
-- [__Name String__]
-- @VK_NV_compute_shader_derivatives@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 202
--
-- [__Revision__... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_NV_compute_shader_derivatives.hs | bsd-3-clause | 10,074 | 0 | 14 | 1,489 | 1,112 | 694 | 418 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module Day4 where
import Data.Char
import Data.List
import Data.List.Split
import Lib
data Room = Room
{ name :: String
, sector :: Int
, checksum :: String
}
deriving (Show)
input :: IO String
input = readFile "day4"
parse :: String -> Room
parse s = Room name ... | mbernat/aoc16-haskell | src/Day4.hs | bsd-3-clause | 1,249 | 0 | 14 | 307 | 519 | 277 | 242 | 37 | 2 |
{- |
Module : $Header$
Description : Parse a string to a propositional Formula
Copyright : (c) Till Theis
License : MIT
Maintainer : Till Theis <theis.till@gmail.com>
Stability : experimental
Portability : portable
Parse a string to a propositional Formula.
-}
module PropositionalLogic.Parser ... | tilltheis/propositional-logic | src/PropositionalLogic/Parser.hs | bsd-3-clause | 6,623 | 0 | 13 | 1,546 | 2,272 | 1,168 | 1,104 | 141 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Lazy as BL
import Data.Csv
import Data.Char
import Data.Time.Calendar
import Data.Time.LocalTime
import qualified Data.Vector as V
import System.Environment (getArgs, getProgNa... | obcode/bloodprint | src/BloodPrint.hs | bsd-3-clause | 2,231 | 0 | 16 | 724 | 708 | 373 | 335 | 64 | 2 |
module Main where
import Test.HUnit hiding (path)
import TestUtil
import Database.TokyoCabinet.FDB
import Data.Maybe (catMaybes, fromJust)
import Data.List (sort)
import Control.Monad
dbname :: String
dbname = "foo.tcf"
withOpenedFDB :: String -> (FDB -> IO a) -> IO ()
withOpenedFDB name action = do
h <- new
op... | tom-lpsd/tokyocabinet-haskell | tests/FDBTest.hs | bsd-3-clause | 5,943 | 0 | 17 | 2,159 | 2,240 | 1,122 | 1,118 | 174 | 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.
module Duckling.E... | rfranek/duckling | tests/Duckling/Email/FR/Tests.hs | bsd-3-clause | 584 | 0 | 9 | 96 | 77 | 49 | 28 | 10 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section{Haskell abstract syntax definition}
This module glues together the pieces of the Haskell abstract syntax,
which is declared in the various \tr{Hs*} modules. This module,
therefore, is almost nothing but re-export... | vikraman/ghc | compiler/hsSyn/HsSyn.hs | bsd-3-clause | 4,636 | 0 | 21 | 1,448 | 662 | 381 | 281 | 69 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Model.Db (
createTables
, tagNameExists
, listTags
-- * Todos
, queryTodo
, saveTodo
, listTodos
, removeTodoTag
, addTodoTag
-- * Notes
, queryNote
, saveNote
, listNotes
, addNoteTag
, removeNoteTag
, TodoId(..)
, ... | nurpax/hstodo | src/Model/Db.hs | bsd-3-clause | 10,302 | 0 | 20 | 3,042 | 2,741 | 1,387 | 1,354 | 217 | 4 |
{-|
Module : Export.LatexGenerator
Description : Contains functions for creating LaTeX text.
-}
module Export.LatexGenerator
(generateTex) where
import Text.LaTeX
import Text.LaTeX.Packages.Graphicx
import Text.LaTeX.Packages.Fancyhdr
import Text.LaTeX.Packages.Geometry
-- | Create a TEX file named t... | hermish/courseography | app/Export/LatexGenerator.hs | gpl-3.0 | 1,528 | 0 | 12 | 273 | 324 | 165 | 159 | 26 | 1 |
module S06_Ex3 where
{-
Module : S06_Ex3
Description : Series 06 of the Functionnal and Logic Programming course at UniFR
Author : Sylvain Julmy
Email : sylvain.julmy(at)unifr.ch
-}
import Data.Char
-- Tests import
import qualified Test.HUnit as T
import Text.Show.Functions -- to show <function>
import Text.Form... | SnipyJulmy/mcs_notes_and_resume | fun-and-log-prog/exercices/s06/s06_Julmy_Sylvain/ex3.hs | lgpl-3.0 | 5,128 | 0 | 13 | 1,174 | 2,164 | 1,227 | 937 | 106 | 3 |
module Handler.Verify
( getVerifyR )
where
import Import
import Yesod.Auth
getVerifyR :: Handler RepHtml
getVerifyR = do
maid <- maybeAuthId
defaultLayout [whamlet|
<p>Your current auth ID: #{show maid}
$maybe _ <- maid
<p>
<a href=@{AuthR LogoutR}>Logout
$nothing
<p>
<a href=@{Au... | ChrisSwires/One | Handler/Verify.hs | bsd-2-clause | 356 | 0 | 7 | 85 | 49 | 28 | 21 | -1 | -1 |
module Kennitala (kennitala,gildKennitala,kennitöluHafi,vartölu,
dagur,mánuður,ár,raðtala,vartala,öld,
Aðili(Einstaklingur,Lögaðili),
mánaðardagar,hlaupár) where
import Text.Read
import Control.Applicative
import Data.Traversable
data Kennitala = Kennitala {
... | bjorsig/Kennitala | hsKennitala/Kennitala.hs | bsd-2-clause | 5,522 | 32 | 20 | 1,383 | 1,688 | 892 | 796 | 101 | 7 |
-------------------------------------------------------------------------------
-- This program runs fib and sumEuler separately and sequentially
-- to allow us to compute how long each individual function takes
-- to execute.
module Main
where
import System.Time
import Control.Parallel
import System.Mem
-... | ml9951/ThreadScope | papers/haskell_symposium_2009/sumEuler/SumEuler0.hs | bsd-3-clause | 2,163 | 0 | 12 | 385 | 477 | 245 | 232 | 37 | 1 |
{-# LANGUAGE BangPatterns, Rank2Types #-}
module Math.Probably.Fitting where
import Numeric.FAD
fit :: (Ord a, Floating a) => (forall tag. b -> [Dual tag a] -> Dual tag a) -> [(b,a)] -> [a] -> [[a]]
fit g pts p0 = let ss args = sum $ map (\(t,y)-> (g t args - lift y)**2) pts
in argminNaiveGradient ss... | glutamate/probably | Math/Probably/Fitting.hs | bsd-3-clause | 943 | 0 | 16 | 232 | 437 | 238 | 199 | 13 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE DisambiguateRecordFields #-}
module Verify.Graphics.Vty.Image
( module Verify.Graphics.Vty.Image
, module Graphics.Vty.Image
)
where
import Verify.Graphics.Vty.Attributes
import Graphics.Vty.Image
import Graphics.Vty.Image.Internal
impor... | jtdaugherty/vty | test/Verify/Graphics/Vty/Image.hs | bsd-3-clause | 7,815 | 0 | 17 | 2,313 | 2,015 | 1,039 | 976 | 154 | 1 |
{-# LANGUAGE CPP #-}
module Network.Wai.Handler.Warp.Date (
withDateCache
, GMTDate
) where
import Control.AutoUpdate (defaultUpdateSettings, updateAction, mkAutoUpdate)
import Data.ByteString
import Network.HTTP.Date
#if WINDOWS
import Data.Time (UTCTime, getCurrentTime)
import Data.Time.Clock.POSIX (utcTim... | creichert/wai | warp/Network/Wai/Handler/Warp/Date.hs | mit | 1,115 | 0 | 8 | 198 | 213 | 127 | 86 | 16 | 1 |
----------------------------------------------------------------------------
--
-- Pretty-printing of Cmm as (a superset of) C--
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
--
-- This is where we walk over CmmNode emitting an external re... | lukexi/ghc-7.8-arm64 | compiler/cmm/PprCmm.hs | bsd-3-clause | 10,036 | 0 | 23 | 3,137 | 2,516 | 1,287 | 1,229 | 179 | 24 |
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, PatternGuards #-}
----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.BorderResize
-- Copyright : (c) Jan Vornberger 2009
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : jan.vornber... | markus1189/xmonad-contrib-710 | XMonad/Layout/BorderResize.hs | bsd-3-clause | 9,965 | 2 | 22 | 2,827 | 2,686 | 1,410 | 1,276 | 154 | 4 |
{-# LANGUAGE ScopedTypeVariables #-}
-- You can set the following VERBOSE environment variable to control
-- the verbosity of the output generated by this module.
module PackageTests.PackageTester
( PackageSpec(..)
, SuiteConfig(..)
, Success(..)
, Result(..)
-- * Running cabal commands
, caba... | enolan/cabal | Cabal/tests/PackageTests/PackageTester.hs | bsd-3-clause | 13,245 | 0 | 16 | 3,160 | 3,274 | 1,692 | 1,582 | 298 | 3 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE LiberalTypeSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Main (proper... | rpglover64/lens | tests/properties.hs | bsd-3-clause | 4,134 | 0 | 11 | 1,223 | 1,065 | 582 | 483 | -1 | -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="en-GB">
<title>Passive Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</ho... | kamiNaranjo/zap-extensions | src/org/zaproxy/zap/extension/pscanrules/resources/help/helpset.hs | apache-2.0 | 992 | 82 | 67 | 173 | 425 | 217 | 208 | -1 | -1 |
{-# LANGUAGE Safe #-}
-- | This module contains functions and data used for building
-- a game of TicTacToe.
module Game.TicTacToe where
import Data.Array (Array, listArray, (//), elems, (!), indices)
import Data.List (transpose, find, nub)
import Data.List.Split (chunksOf)
import Data.Maybe (isJust, fromJust, isNot... | Wollw/TicTacToe-HS | src/Game/TicTacToe.hs | isc | 3,241 | 0 | 13 | 960 | 775 | 439 | 336 | -1 | -1 |
module Game.Callbacks where
import Graphics.UI.GLUT
import Data.IORef
import Coroutine
import Game.DeltaClock
import Game.Keyboard
import Game.Game (Game)
import Game.Rendering
type ClockRef = IORef DeltaClock
type GameRef = IORef Game
type KeyboardRef = IORef Keyboard
type CallbackRefs = (ClockRef, KeyboardRef, Ga... | sgrif/haskell-game | Game/Callbacks.hs | mit | 752 | 0 | 11 | 128 | 251 | 132 | 119 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative
import Snap.Core
import Snap.Util.FileServe
import Snap.Http.Server
import Snap.Util.FileUploads
import qualified Data.Enumerator.List as EL
import Control.Monad (liftM)
import Control.App... | cirquit/Personal-Repository | Haskell/arduino-webserver/app/Main.hs | mit | 3,301 | 0 | 14 | 746 | 846 | 465 | 381 | 62 | 2 |
import Data.List (permutations)
import Data.Set (fromList, elems, union)
main = do
print $ sum $ elems $ fromList ((products s144) ++ (products s234)) where
products splitter = [c | (a, b, c) <- map splitter ps, a*b==c]
s144 ([x1, x2, x3, x4, x5, x6, x7, x8, x9]) = ( x1, ((x2*10+x3)*10+x4)*10... | dpieroux/euler | 0/0032.hs | mit | 501 | 0 | 15 | 121 | 340 | 191 | 149 | 8 | 1 |
import System.Environment
import Data.List
--import Data.Maybe
import AStar
import Parser
import NPuzzle
import Heuristics
main :: IO ()
main = do args <- getArgs
if length args /= 1
then putStrLn "Usage: ./graphi file/path"
else do
content <- readFile (head args)
... | Shakadak/n-puzzle | Main.hs | mit | 960 | 0 | 20 | 348 | 279 | 138 | 141 | 23 | 3 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module Tests.GB2.Primitive where
import Test.Framework
import GB2.Primitive
import GB2.Geometry
import Control.Applicative
-- #####################################
-- Vector Tests
-- #####################################
-- ##### QuickCheck #####
-- ##### HUnit #####
-- # Norma... | gbataille/halray | test/Tests/GB2/Primitive.hs | mit | 2,326 | 0 | 13 | 675 | 739 | 383 | 356 | 35 | 1 |
{-# LANGUAGE BangPatterns #-}
module Geometry.Randomish
( randomishPoints
, randomishInts
, randomishDoubles)
where
import Data.Word
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Unboxed.Mutable as MV
import qualified Data.Vector.Unboxed as V
-- | Some uniformly distributed points
rand... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss-examples/picture/Visibility/Geometry/Randomish.hs | mit | 3,236 | 116 | 11 | 762 | 749 | 432 | 317 | 75 | 1 |
module Problem9 where
main :: IO ()
main = print $ head [a*b*(1000 - a - b) |
b <- [1..499],
a <- [1..b-1],
a^2 + b^2 == (1000 - a - b)^2]
| DevJac/haskell-project-euler | src/Problem9.hs | mit | 213 | 0 | 13 | 107 | 113 | 60 | 53 | 6 | 1 |
module H99.Q1to10
( tests1to10,
encode
) where
import Test.Tasty
import Test.Tasty.HUnit as HU
--import Test.HUnit.Tools (assertRaises)
{-| Problem 1.
Find the last element of a list.
-}
myLast :: [a] -> a
myLast [] = error "No such element"
myLast (x:[]) = x
myLast (_:xs... | izmailoff/haskell-h99 | src/H99/Q1to10.hs | mit | 7,445 | 0 | 17 | 3,060 | 1,887 | 1,032 | 855 | 115 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Gradebot where
import qualified Data.Map as M
import Control.Applicative
import qualified Data.ByteString.Lazy as BL
import Data.Csv
import qualified Data.Vector as V
import Data.Maybe
import Data.Either.Unwrap
import Data.List
type Code = String
data CodeBlock = CodeBlock... | stephenjbarr/gradebot | Gradebot.hs | mit | 10,608 | 0 | 39 | 2,800 | 3,019 | 1,605 | 1,414 | 213 | 2 |
-- Problems/Problem027.hs
module Problems.Problem027 (p27) where
import Helpers.Primes
main = print p27
p27 :: Int
p27 = snd $ maximum $ map calcConsecutives combinations
where calcConsecutives (a,b) = (consecutives 0 (a,b),a * b)
combinations :: [(Int,Int)]
combinations = [(a,b) | a <- [-999..999], b <- (takeW... | Sgoettschkes/learning | haskell/ProjectEuler/src/Problems/Problem027.hs | mit | 494 | 0 | 13 | 97 | 238 | 132 | 106 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent (threadDelay)
import Control.Monad
import Control.Monad.IO.Class (liftIO, MonadIO)
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Reader
import Data.Aeson
import Data.Maybe
import Data.Time
import Data.Time.Clock.POSIX
import Data.Text
import D... | jliuhtonen/lastfm-dump | src/Main.hs | mit | 4,747 | 4 | 19 | 1,004 | 1,501 | 754 | 747 | 108 | 3 |
module Main where
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import TopStrings
main :: IO ()
main = TIO.getContents >>= printTopStrings . topStrings . T.lines
| spoj/mwtools | app/usc.hs | mit | 188 | 0 | 8 | 31 | 55 | 34 | 21 | 6 | 1 |
{-# LANGUAGE OverlappingInstances #-}
-- |This module provides an open union of functors.
module Data.Union
( Union
, Member
, inj
, prj
, decomp
, trivial
) where
import Data.Maybe
import Data.Typeable
import Unsafe.Coerce (unsafeCoerce)
-- |`Union` is an open sum of functors
-- A value of type `Union` r a is a va... | edofic/effect-handlers | src/Data/Union.hs | mit | 1,755 | 0 | 9 | 388 | 513 | 278 | 235 | -1 | -1 |
-- Filter Module
module Lib.Filter where
import Network.PFQ.Lang.Prelude
import Network.PFQ.Lang.Default
filterFunction = par ip ip
| pfq/PFQ | user/pfq-lang/examples/Lib/Filter.hs | gpl-2.0 | 139 | 0 | 5 | 22 | 31 | 20 | 11 | 4 | 1 |
{- |
Module : $Header$
Description : Tree-based implementation of 'Graph' and 'DynGraph'
using Data.Map
Copyright : (c) Martin Erwig, Christian Maeder and Uni Bremen 1999-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : p... | nevrenato/Hets_Fork | Common/Lib/Graph.hs | gpl-2.0 | 9,857 | 0 | 23 | 2,814 | 4,003 | 2,066 | 1,937 | 203 | 8 |
{-# LANGUAGE OverloadedStrings #-}
-- Copyright (C) 2010-2011 John Millikin <jmillikin@gmail.com>
--
-- 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
-- a... | jmillikin/haskell-xmpp | lib/Network/Protocol/XMPP/Client.hs | gpl-3.0 | 4,939 | 23 | 18 | 942 | 1,334 | 692 | 642 | -1 | -1 |
import Data.DotsAndBoxes.Test.General
import Control.Monad
import System.Exit
import Test.HUnit
main :: IO ()
main = do
-- propSuccess <- runPropTests
-- unless propSuccess exitFailure
hunitResult <- runTestTT testGroup
unless (errors hunitResult == 0 && failures hunitResult == 0) exitFailure
| mcapodici/dotsandboxes | test/Spec.hs | gpl-3.0 | 309 | 1 | 12 | 53 | 82 | 41 | 41 | 8 | 1 |
{-# OPTIONS_GHC -Wall #-}
module Main where
import Analysis
import GrammarFilters
import Test.HUnit
isAmbiguousSentence :: String -> Bool
isAmbiguousSentence = (isSingleSentence `andAlso` (isAmbiguous))
testBasicSentence :: Test
testBasicSentence =
TestCase $ assertBool "Basic sentence"
(isWellFormed "m... | penguinland/nlp | IntegrationTest.hs | gpl-3.0 | 6,048 | 0 | 10 | 1,772 | 774 | 419 | 355 | 139 | 1 |
module EngineTypes where
import Tiles
import Foreign.C.Types
import SDL
import Vector (Mat)
import Control.Concurrent
data Avatar = Avatar { plPos :: (Int,Int)
, plTiles :: [TileStack]
, direct :: Direction
}
data Sys = Sys { width :: Int
,... | eniac314/wizzard | src/EngineTypes.hs | gpl-3.0 | 1,080 | 0 | 13 | 510 | 261 | 165 | 96 | 28 | 0 |
module Handler.ProductSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getProductR" $ do
error "Spec not implemented: getProductR"
describe "postProductR" $ do
error "Spec not implemented: postProductR"
describe "putProductR" $ do
error "Spec not ... | Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes | yesod/test/Handler/ProductSpec.hs | gpl-3.0 | 437 | 0 | 11 | 108 | 92 | 41 | 51 | 12 | 1 |
module Problem041 (answer) where
import NumUtil (genPanDigitNumbers)
import Primes (isPrime)
answer :: Int
answer = maximum $ filter isPrime (concatMap (uncurry genPanDigitNumbers) range)
where range = zip (repeat 1) [2..9]
| geekingfrog/project-euler | Problem041.hs | gpl-3.0 | 228 | 0 | 10 | 34 | 81 | 45 | 36 | 6 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Mudblood.Contrib.MG.Guilds.Common
( spell, hands, unhands
) where
import Data.String.Utils
import Data.Maybe
import Mudblood
import Mudblood.Contrib.MG.State
spell :: (MBMonad m u, Has R_Common u) => String -> m ()
spell sp = do
focus <- getU' R_Common mgFocus
... | talanis85/mudblood | src/Mudblood/Contrib/MG/Guilds/Common.hs | gpl-3.0 | 850 | 0 | 12 | 215 | 316 | 159 | 157 | 25 | 3 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
module Wat where
import Data.List
import Data.Char
import Data.Time
import Data.Tuple
import Data.Maybe
import Control.Applicative
import Data.Semigroup
import Data.Monoid hiding ((<>))
import Test.QuickCheck
import Test.QuickCheck.Che... | fxmy/haskell-book-exercise | src/Wat.hs | gpl-3.0 | 38,325 | 0 | 18 | 10,795 | 16,613 | 8,583 | 8,030 | -1 | -1 |
main = do
calcThis <- getLine
print $ solveRPN calcThis
solveRPN :: String -> Double
solveRPN = head . foldl foldingFunction [] . words
where foldingFunction (x:y:ys) "*" = (y * x):ys
foldingFunction (x:y:ys) "+" = (y + x):ys
foldingFunction (x:y:ys) "-" = (y - x):ys
foldingFunction xs nu... | medik/lang-hack | Haskell/LearnYouAHaskell/c10/RPNCalc/RPNCalc.hs | gpl-3.0 | 363 | 4 | 12 | 92 | 172 | 85 | 87 | 9 | 4 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.PySMEIL.Instances ( Variable (..) ) where
import Language.PySMEIL.AST
-- TODO: Is there a better way to do this?
instance Ord Variable where
a `compare` b = s a `compare` s b
where
s (ParamVar _ i) = "param_" ++ i
s (ConstVar _ i) = "co... | truls/almique | src/Language/PySMEIL/Instances.hs | gpl-3.0 | 418 | 0 | 10 | 116 | 149 | 80 | 69 | 9 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.OSLogin.Types
-- Copyright : (c) 2015-2016 Brendan Hay... | brendanhay/gogol | gogol-oslogin/gen/Network/Google/OSLogin/Types.hs | mpl-2.0 | 2,342 | 0 | 7 | 512 | 238 | 163 | 75 | 57 | 1 |
-- | Round 1A 2015 Problem A. Mushroom Monster
-- https://code.google.com/codejam/contest/4224486/dashboard
module MushroomMonster where
-- constant imports
import Text.ParserCombinators.Parsec
import Text.Parsec
import System.IO (openFile, hClose, hGetContents, hPutStrLn, IOMode(ReadMode), stderr)
import Debug.Trace ... | dirkz/google-code-jam-haskell | practice/src/MushroomMonster.hs | mpl-2.0 | 2,758 | 0 | 14 | 664 | 878 | 466 | 412 | 68 | 2 |
{-# LANGUAGE QuasiQuotes, FlexibleInstances #-}
module Trigger where
import Str(str)
import Util
import Console
import Diff
import Data.Bits
import Debug.Trace
triggerList = [str|
SELECT n.nspname as "Schema", c.relname AS "Relation", t.tgname AS "Name", tgtype AS "Type", t.tgenabled = 'O' AS enabled,
concat (np.n... | sourcewave/pg-schema-diff | Trigger.hs | unlicense | 3,319 | 0 | 14 | 731 | 1,060 | 565 | 495 | 48 | 4 |
--- (c) Martin Braun, November 2015
--- 101lang is an experimental language
--- used to learn the basics of programming
--- language design with Haskell
---
--- License: Apache 2.0
---
--- file: parser.hs
module Parser where
import Syntax
import Text.ParserCombinators.Parsec
{-
-- Parsing the expression
parseInteger... | s4ke/101lang | parser.hs | apache-2.0 | 1,090 | 0 | 4 | 253 | 22 | 18 | 4 | 3 | 0 |
module Main where
import Control.Monad (replicateM)
import qualified Data.ByteString as BS
import Network.Simple.TCP
import System.Environment
import RL_Glue.Experiment
import RL_Glue.Network
main = do
args <- getArgs
let n = read $ head $ args
runExperiment (doExperiments n)
runExperiments :: Int -> IO ()
ru... | rhofour/PlayingAtari | src/SimpleExperiment.hs | apache-2.0 | 1,083 | 0 | 13 | 193 | 342 | 165 | 177 | 30 | 1 |
module Lambda.Reduce
(
-- * Normal-order beta reduction
reduce
)
where
import Control.Monad
(
MonadPlus
, guard
)
import Lambda.Deconstruct
import Lambda.Term
{- |
Normal-order beta reduction (capture-avoiding substitution).
If the input term is not a beta redex, this produces 'A.em... | edom/ptt | src/Lambda/Reduce.hs | apache-2.0 | 1,403 | 0 | 15 | 429 | 403 | 209 | 194 | 28 | 1 |
module Codec.JVM (module X) where
import Codec.JVM.ASM as X
import Codec.JVM.Class as X
import Codec.JVM.Types as X
import Codec.JVM.ASM.Code as X
import Codec.JVM.ASM.Code.Types as X hiding (BranchType(..))
| rahulmutt/codec-jvm | src/Codec/JVM.hs | apache-2.0 | 209 | 0 | 6 | 28 | 65 | 48 | 17 | 6 | 0 |
module NLP.Crubadan (readCrData) where
import qualified Data.Map as M
import qualified Data.Text as T
import Text.ParserCombinators.Parsec
import NLP.General
import NLP.Freq
readCrData :: String -> IO (FreqList TriGram)
readCrData fpath =
do s <- readFile fpath
let ngs = (fmap M.fromList . parse triGramFil... | RoboNickBot/nlp-libs | src/NLP/Crubadan.hs | bsd-2-clause | 813 | 0 | 14 | 261 | 299 | 145 | 154 | 24 | 2 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
module CLaSH.GHC.LoadInterfaceFiles
(loadExternalExprs)
where
-- External Modules
import Data.Either (partitionEithers)
import Data.L... | christiaanb/clash-compiler | clash-ghc/src-ghc/CLaSH/GHC/LoadInterfaceFiles.hs | bsd-2-clause | 5,462 | 0 | 24 | 1,616 | 1,477 | 765 | 712 | 127 | 7 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
module Data.CRF.Chain2.Generic.Model
( FeatGen (..)
, FeatSel
, selectPresent
, selectHidden
, Model (..)
, mkModel
, Core (..)
, core
, withCore
, phi
, index
, presentFeats
, hiddenFeats
, obFeatsOn
, trFeatsOn
, onWord
, onTransition
, lbNum
, lbOn
... | kawu/crf-chain2-generic | Data/CRF/Chain2/Generic/Model.hs | bsd-2-clause | 5,446 | 0 | 14 | 1,600 | 2,211 | 1,165 | 1,046 | 146 | 4 |
-- | Peer proceeses
{-# LANGUAGE ScopedTypeVariables, BangPatterns #-}
module Process.Peer (
-- * Interface
Process.Peer.start
-- * Tests
, Process.Peer.testSuite
)
where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
import Control.DeepSeq
import Control.Excep... | rethab/combinatorrent | src/Process/Peer.hs | bsd-2-clause | 30,335 | 1 | 20 | 9,607 | 8,471 | 4,250 | 4,221 | 688 | 17 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.